-
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
RabbitMQ ignores unacknowledged messages since >=2.0 #2572
Comments
The amqp protocol only exposes unacked messages, to include those you have to use the http mode which talks to the Management API instead. |
@coderanger I have reverse engineered the code - regardless of the protocol they are not collected, this is something removed in other change sets :( |
lol thank you @coderanger will give it a try and update the ticket accordingly! |
Hello, I am having this same issue, both with HTTP and AMQP protocols |
I've checked and can see that there is another property for |
Okey, digging into the returned json, I can see that there are 3 different keys, |
@JorTurFer Is the same counting mechanism used for https://keda.sh/docs/2.6/scalers/rabbitmq-queue/
|
I'm not sure @bartbkr. Depending on how it works, I'll update the docs according to the reality |
Not sure about the regex mode as I've never used it but it's pulling from the same |
so, |
Yes, but we're not using that. We're using the |
yes, sorry. IDK why I was focus on that even thought I checked it, but I guess that |
@JorTurFer Thank you and thanks for the clarification. |
Hello,
This is the interesting parts of the json returned:
|
@masterphenix _stats is rolling counts since the node started. Useful for rate checks (which is why they are presented there) but not current sizes. |
Ok @coderanger thank you for this explaination 👍 |
Report
RabbitMQ scaler is using AMQP library and the method to get a total of messages returns only messages with ready status in queue.
https://github.com/streadway/amqp/blob/master/channel.go#L837
If the queue has messages with unacknowledged (because are processing in consumer) they will be ignored and the scaler can kill the pod that are processing messages making message returns to queue and create an infinite cycle :(
This was fixed for 1.x and this report closed #638
by introducing
includeUnacked
metadata option #700that was later broken with >=2.0 with couple of PRs
Expected Behavior
Return total of messages in the queue
Actual Behavior
Return the total of ready messages and there is no way to switch to Total (Total = Ready + Unacked)
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.4.0
Kubernetes Version
1.21
Platform
Any
Scaler Details
RabbitMQ
Anything else?
No response
The text was updated successfully, but these errors were encountered: