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

get_messages now requires 'ackmode' on request #62

Open
henryclon opened this issue Dec 30, 2021 · 1 comment
Open

get_messages now requires 'ackmode' on request #62

henryclon opened this issue Dec 30, 2021 · 1 comment

Comments

@henryclon
Copy link

get_messages shows an error when trying it with the latest rabbitMQ, missing key 'ackmode'
When using the web browser GUI, there is a field called "Ack mode" for getting messages from a queue, upon further inspection these are the values:

<select name="ackmode">
                <option value="ack_requeue_true" selected="">Nack message requeue true</option>
                <option value="ack_requeue_false">Automatic ack</option>
                <option value="reject_requeue_true">Reject requeue true</option>
                <option value="reject_requeue_false">Reject requeue false</option>
</select>

I added it to my local pyrabbit package and it works :)

def get_messages(self, vhost, qname, count=1,
                     requeue=False, truncate=None, encoding='auto', ackmode='ack_requeue_false'):
...
base_body = {'count': count, 'requeue': requeue, 'encoding': encoding, 'ackmode': ackmode}
@henryclon
Copy link
Author

This issue is already solved on a pull request

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

No branches or pull requests

1 participant