0

I've got a loop for consuming on a number of queues (about 60), like so:

    for queue in all_queues:
        channel.basic_consume(queue=queue,
                              on_message_callback=self.callback,
                              auto_ack=False)

Is it normal to have so many consumes or is there a more efficient, logical way to consume incoming messages? I have two exchanges, both are direct: one is a normal exchange, the other (retry) is for retries and errors. There are about 30 queues in the main exchange, and 60 in the retry exchange.

pymat
  • 1,090
  • 1
  • 23
  • 45
  • If you have 30 queues that are bound to the exchange using different routing keys, you will have to use 30 consumers. Could you implement the consumer callback functions so that they can handle messages that are logicially belonging to different routing keys? –  Aug 28 '19 at 07:18
  • @LutzHorn: I added a new post (https://stackoverflow.com/questions/57707335/message-sequence-acting-unexpectedly-in-rabbitmq) Thanks. – pymat Aug 29 '19 at 09:40

0 Answers0