Error “unknown delivery tag” occurs when i try ack messages to RabbitMQ using pika (python)

前端 未结 7 1229
别跟我提以往
别跟我提以往 2021-02-07 00:57

I want process messages in few threads but i\'m getting error during execute this code:

from __future__ import with_statement
import pika
import sys
from pika.ad         


        
7条回答
  •  眼角桃花
    2021-02-07 01:16

    You might also be encountering this error if you are trying to acknowledge a message on a different channel from which it was created. This might happen if you are closing or recreating channels.

    From the docs: https://www.rabbitmq.com/confirms.html

    Another scenario in which the broker will complain about an "unknown delivery tag" is when an acknowledgement, whether positive or negative, is attempted on a channel different from that on which the delivery was received on. Deliveries must be acknowledged on the same channel.

提交回复
热议问题