Skip to content
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

Change how --no-acking works #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marcinkoziej
Copy link
Contributor

Hi!
I wanted to use amqp consume -n 1 to just get one message and exit.
But I couldn't:

The auto-acking option set in amqp channel consume call would mean, that if there were more messages waiting, we would still get more then one message (even with prefetch =1).
I tried with --no-ack but then the actions would not be removed from the queue at all (because server would not receive any acks).

I changed the way --no-ack works - we always do auto-ack = false, and then we ack or not depending on the --no-ack flag.
Please check if this works also for your use case.

Add -S --ssl flag to use SSL (amqps)
no-ack should not mean be about auto-ack but rahter if we ack a message
at all.
This way we can actually get 1 message. Otherwise with auto-acking, we
get more messages even with prefetch = 1; as the server will just push
them to us. With --no-ack specified, we would not even pop 1 message
from the server, it will always reque
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant