Извлечение из pika docs говорит о том, что вы ошиблись basic_nck
... это просто ошибка вопроса или ваша проблема?
ef basic_nack(self, delivery_tag=None, multiple=False, requeue=True):
"""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 bool multiple: If set to True, the delivery tag is treated as
"up to and including", so that multiple messages
can be acknowledged with a single method. If set
to False, the delivery tag refers to a single
message. If the multiple field is 1, and the
delivery tag is zero, this indicates
acknowledgement of all outstanding messages.
:param bool requeue: If requeue is true, the server will attempt to
requeue the message. If requeue is false or the
requeue attempt fails the messages are discarded or
dead-lettered.
"""
self._raise_if_not_open()
return self._send_method(
spec.Basic.Nack(delivery_tag, multiple, requeue))
Извините за это, но насколькокак я знаю, для basic_nack (или basic_ack) невозможно изменить заголовки. Проблема в том, что «измененное» сообщение будет помещено в очередь недоставленных сообщений, а новое будет иметь более новый идентификатор.
L-