Expose publish reject counter via api and metrics and log in server logs #9634
Replies: 2 comments 5 replies
-
In general, if something is up to the client, it is up to the client, including when it comes to observability. RabbitMQ does not log anything related to individual messages, doing so on a busy system is a no-go as it will overwhelm the logger, waste resources, and have operational consequences. It also does not keep track of totals published, confirmed or rejected, only a rate in the latest metric collection time window. Adding a metric like this makes sense if it can be collected without significant changes. Max length and max bytes are already available in management UI thanks to the fact that effective queue x-arg definition is available. This is also an operator-configurable value, and it can be forcefully set via an operator policy. Exposing what you set via a metric does not sound very convincing to me. RabbitMQ cannot address every issue in poorly written applications. When, for example, a channel is closed with pending confirms, we log it because 1. The client won't have any way to observe this internal metric, and 2. This is a relatively rare event (compared to the messages published/second rate, and in systems with low channel churn anyway). But we cannot log messages for every occurence of an event that may indicate that a consumer must do something. |
Beta Was this translation helpful? Give feedback.
-
Also, if you think about it, the max-length and the overflow behavior are usually operator-defined. If your system does not assume that this can happen, and applications are not ready to handle it, or you cannot afford rejected messages, perhaps those settings should not be used, or should not be used with a low limit value.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
When
max-length
is enabled on quorum queues (and probably Streams but not tested) withoverflow
set toreject-publish
, new messages are rejected. This rejection is notified to the clients and is up to the clients to handle them. As a server operator, there's no mechanism to know when a queue has reached max-length and is rejecting publishesDescribe the solution you'd like
As a server operator, I'd like the following:
As an operator, I can then combine the above two in an alert that can notify us when a queue is approaching or has hit the max limit and intervention is required.
Describe alternatives you've considered
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions