MCPcopy
hub / github.com/pika/pika / basic_nack

Method basic_nack

pika/channel.py:436–460  ·  view source on GitHub ↗

This method allows a client to reject one or more incoming messages. It can be used to interrupt and cancel large incoming messages, or return untreatable messages to their original queue. :param integer delivery_tag: int/long The server-assigned delivery tag :param

(self,
                   delivery_tag: int = 0,
                   multiple: bool = False,
                   requeue: bool = True)

Source from the content-addressed store, hash-verified

434 self._send_method(spec.Basic.Get(queue=queue, no_ack=auto_ack))
435
436 def basic_nack(self,
437 delivery_tag: int = 0,
438 multiple: bool = False,
439 requeue: bool = True) -> None:
440 """This method allows a client to reject one or more incoming messages.
441 It can be used to interrupt and cancel large incoming messages, or
442 return untreatable messages to their original queue.
443
444 :param integer delivery_tag: int/long The server-assigned delivery tag
445 :param bool multiple: If set to True, the delivery tag is treated as
446 "up to and including", so that multiple messages
447 can be acknowledged with a single method. If set
448 to False, the delivery tag refers to a single
449 message. If the multiple field is 1, and the
450 delivery tag is zero, this indicates
451 acknowledgement of all outstanding messages.
452 :param bool requeue: If requeue is true, the server will attempt to
453 requeue the message. If requeue is false or the
454 requeue attempt fails the messages are discarded or
455 dead-lettered.
456
457 """
458 self._raise_if_not_open()
459 return self._send_method(
460 spec.Basic.Nack(delivery_tag, multiple, requeue))
461
462 def basic_publish(self,
463 exchange: str,

Callers 6

testMethod · 0.45
testMethod · 0.45
testMethod · 0.45
test_basic_nackMethod · 0.45
_read_itemMethod · 0.45

Calls 2

_raise_if_not_openMethod · 0.95
_send_methodMethod · 0.95

Tested by 5

testMethod · 0.36
testMethod · 0.36
testMethod · 0.36
test_basic_nackMethod · 0.36