diff --git a/pyrabbit/api.py b/pyrabbit/api.py index 2e2b487..b1d5491 100644 --- a/pyrabbit/api.py +++ b/pyrabbit/api.py @@ -628,9 +628,11 @@ def get_messages(self, vhost, qname, count=1, :returns: list of dicts. messages[msg-index]['payload'] will contain the message body. """ - + ackmode = 'ack_requeue_false' + if requeue: + ackmode = 'ack_requeue_true' vhost = quote(vhost, '') - base_body = {'count': count, 'requeue': requeue, 'encoding': encoding} + base_body = {'count': count, 'ackmode': ackmode, 'encoding': encoding} if truncate: base_body['truncate'] = truncate body = json.dumps(base_body)