-
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 #638
Comments
I had the same problem with our current autoscaler component: We are trying to migrate to Keda and I will be glad to help with coding |
I had this issue too. Certain process just takes a bit longer to ack. |
I found the same issue and from my point of view it comes from a difference in setting the queue treshhold and how the hpa is calculated from that value. The hpa target value is
this translates to
A queueLength of 1 and minPods of 1 results in the following behavior: Same occures if there are 6 messages, except the target will be 200m/1 (avg) on step 5. I would except that on receiving the second message a new pod would start. With this behaviour the scaler is more or less useless. I would except that I can set the desired value to a floating value, like 700m, to get a target of x/700m. As described above, that the total messages are used for calculation, not the ack ones. |
Pull request #700 should fix the problem. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed due to inactivity. |
Co-authored-by: Tom Kerkhove <[email protected]>
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 :(
Expected Behavior
Return total of messages in the queue
Actual Behavior
Return the total of ready messages
Steps to Reproduce the Problem
Specifications
Obs
I'm not sure if it's a bug or a feature.
In my use case, it's a bug, but maybe it's should be optional
The text was updated successfully, but these errors were encountered: