Skip to content
Snippets Groups Projects
Commit f7d4cd45 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

changed basic.nack to basic.reject

basic.nack is RabbitMQ-only
parent dfc84448
No related branches found
No related tags found
No related merge requests found
...@@ -102,10 +102,10 @@ class AMQPBackend(object): ...@@ -102,10 +102,10 @@ class AMQPBackend(object):
:param prefetch_count: prefetch window in terms of whole messages :param prefetch_count: prefetch window in terms of whole messages
""" """
def basic_nack(self, delivery_tag): def basic_reject(self, delivery_tag):
""" """
NACK a message. Reject a message
:param delivery_tag: delivery tag to nack :param delivery_tag: delivery tag to reject
""" """
def basic_publish(self, message, exchange, routing_key): def basic_publish(self, message, exchange, routing_key):
......
...@@ -93,8 +93,8 @@ class PyAMQPBackend(AMQPBackend): ...@@ -93,8 +93,8 @@ class PyAMQPBackend(AMQPBackend):
self.channel.queue_delete(queue.name) self.channel.queue_delete(queue.name)
@translate_exceptions @translate_exceptions
def basic_nack(self, delivery_tag): def basic_reject(self, delivery_tag):
self.channel.basic_nack(delivery_tag, multiple=False) self.channel.basic_reject(delivery_tag, True)
@translate_exceptions @translate_exceptions
def queue_declare(self, queue): def queue_declare(self, queue):
......
...@@ -42,6 +42,9 @@ class ReceivedMessage(Message): ...@@ -42,6 +42,9 @@ class ReceivedMessage(Message):
def nack(self, on_completed=None): def nack(self, on_completed=None):
""" """
Negative-acknowledge this message to the broker. Negative-acknowledge this message to the broker.
This internally results in a basic.reject
:param on_completed: callable/0 to call on acknowledged. Callable will be executed in :param on_completed: callable/0 to call on acknowledged. Callable will be executed in
ClusterHandlerThread's context. ClusterHandlerThread's context.
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment