Consume multiple queues in python / pika

后端 未结 2 907
青春惊慌失措
青春惊慌失措 2021-02-05 01:08

I am trying to create a consumer that would subscribe to multiple queues, and then process messages as they arrive.

The problem is that when there is some data already

2条回答
  •  礼貌的吻别
    2021-02-05 01:28

    The issue is most likely that the first call has issued a Basic.Consume and has already received messages from a pre-populated queue before the second call is issued. You might want to try setting the QoS prefetch count to 1, which will limit RabbitMQ from sending you more than one message at a time.

提交回复
热议问题