RabbitMQ_HealthCheck: QueueInfo ignores management API snake_case fields #798

Closed
opened 2026-07-22 09:25:37 +00:00 by spikerj · 1 comment
Owner

Summary

RabbitMQ_HealthCheck deserializes /api/queues/detailed into QueueInfo with only PropertyNameCaseInsensitive = true. The RabbitMQ management API returns snake_case (messages_ready, messages_unacknowledged, idle_since, …), which does not bind to MessagesReady / MessagesUnacknowledged / IdleSince.

Impact

  • totalReadyMessages stays 0 for real payloads → the “ready > 1000 → Degraded” gate never fires.
  • idleQueues stays empty → idle reporting is blank.
  • Unacked totals are similarly wrong (though DLQ depth still works because it uses messages).

Repro

Pinned characterization: RabbitMqHealthCheckTests.CheckHealthAsync_SnakeCaseReadyMessages_Ignored_Characterization798 on test/coverage-wave-2026-07.

Fix

Add [JsonPropertyName("messages_ready")] (etc.) on QueueInfo, or use a snake_case naming policy / source-generated DTO matching the management API.

## Summary `RabbitMQ_HealthCheck` deserializes `/api/queues/detailed` into `QueueInfo` with only `PropertyNameCaseInsensitive = true`. The RabbitMQ management API returns **snake_case** (`messages_ready`, `messages_unacknowledged`, `idle_since`, …), which does **not** bind to `MessagesReady` / `MessagesUnacknowledged` / `IdleSince`. ## Impact - `totalReadyMessages` stays `0` for real payloads → the “ready > 1000 → Degraded” gate never fires. - `idleQueues` stays empty → idle reporting is blank. - Unacked totals are similarly wrong (though DLQ depth still works because it uses `messages`). ## Repro Pinned characterization: `RabbitMqHealthCheckTests.CheckHealthAsync_SnakeCaseReadyMessages_Ignored_Characterization798` on `test/coverage-wave-2026-07`. ## Fix Add `[JsonPropertyName("messages_ready")]` (etc.) on `QueueInfo`, or use a snake_case naming policy / source-generated DTO matching the management API.
Author
Owner

Migrated to spikerj/spikersoft-backend#531 as part of the umbrella-tracker breakup.

Verified 2026-08-07 against spikersoft-backend@98102023, and live: Confirmed in production. curl https://api.spikersoft.com/healthz → the RabbitMQ check reports totalQueues: 267, totalMessages: 289807, but totalReadyMessages: 0 and totalUnacknowledgedMessages: 0. 289,807 messages exist across 267 queues and both derived totals are zero — exactly the described binding failure, so the "ready > 1000 → Degraded" gate has never been able to fire..
Status: not started — and now confirmed live: prod healthz reports 289,807 messages with 0 ready and 0 unacknowledged.

Closing here. Work now lives in the repo that holds the fix, so fixes #531 in a PR will auto-close it on merge. The umbrella tracker keeps cross-repo epics only.

— Opus 5 Agent

Migrated to **spikerj/spikersoft-backend#531** as part of the umbrella-tracker breakup. Verified 2026-08-07 against ``spikersoft-backend@98102023``, and live: **Confirmed in production.** `curl https://api.spikersoft.com/healthz` → the RabbitMQ check reports `totalQueues: 267`, `totalMessages: 289807`, but `totalReadyMessages: 0` **and** `totalUnacknowledgedMessages: 0`. 289,807 messages exist across 267 queues and both derived totals are zero — exactly the described binding failure, so the "ready > 1000 → Degraded" gate has never been able to fire.. Status: not started — and now confirmed live: prod healthz reports 289,807 messages with 0 ready and 0 unacknowledged. Closing here. Work now lives in the repo that holds the fix, so `fixes #531` in a PR will auto-close it on merge. The umbrella tracker keeps cross-repo epics only. — Opus 5 Agent
Sign in to join this conversation.