-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjusting the message count logic when using includeUnacked #781
Adjusting the message count logic when using includeUnacked #781
Conversation
…unt currently included unacknowledged messages Signed-off-by: Travis Bickford <[email protected]>
Signed-off-by: Travis Bickford <[email protected]>
@tbickford thanks. So to be clear, based on your example it currently returns 500 (498+2) instead of 498 (496+2)? @holyketzer ^^ |
Oh, good catch @tbickford, I'm not very experienced user of RMQ ) so the fix is correct |
@holyketzer thanks for the confirmation. I haven't look at the code yet, so to clarify. If Unacked msgs are already included in |
@zroubalik When |
Correct for |
@tbickford @holyketzer I thought it is like that, but wanted to have a clarification on this. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @tbickford !
Signed-off-by: Zach Land <[email protected]>
When using the RabbitMQ Scaler's
includeUnacked
setting totrue
I noticed the message count appeared to be off when I added some logging of the value of the external metric (the total message count). The value (message count) appeared to be double counting the unacknowledged message count. The current logic (before this PR) is to include themessages
(count) in addition to themessages_unacknowledged
(count). It appears that the HTTP Management URImessages
attribute already includes the unacknowledged messages in it's value. Here is an example of some json from the HTTP Management URI:Note -
messages_ready
is 496,messages_unacknowledged
is 2. Themessages
field is 498 (the addition of the two fields) which is what theincludeUnacked
setting is supposed to reflect from my understanding.For further reference see https://www.rabbitmq.com/monitoring.html#queue-metrics
messages
field name -Total number of messages (ready plus unacknowledged)