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

前端 未结 7 1046
别跟我提以往
别跟我提以往 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:21

    I don't have a fix, but I can verify that it occurs using the BlockingConnection adapter.

    It consistently occurs when acknowledging or rejecting a message that is being redelivered in response to a channel.basic_recover()

    pika 0.9.5, rabbitMQ 2.2.0, python 2.7, and Erlang R14B01

    The workaround I have in place is to always specify deliver_tag=0

    I suspect that this only works if the message you are acking/nacking is the last one you've read (in stream). The library I'm writing abstracts the message in such a way that each one can be acknowledged independently, which breaks with this solution.

    Can anyone confirm if this has been fixed or acknowledged by anyone on the pika team yet ? Or, could it be it an issue with RabbitMQ ?

    0 讨论(0)
提交回复
热议问题