python - rabbitmq multiple consumers on a queue- only one get the message -


i implemented multiple consumers, fetching messages single queue, doing using similar this example, except i'm doing basic.get on infinite loop polling.

any idea how prevent racing between consumers, in 1 consumer message , other continue polling until message comes?
trying follow logic in message ack message removed, seems other queues, manage message before first has ack , removed message. got message.

thanks in advance

any idea how prevent racing between consumers, in 1 consumer message , other continue polling until message comes?

you can't, way have things set up. rabbitmq round-robin messages consumers, 1 consumer receive message queue. design in rabbitmq, when have multiple consumers on single queue.

if need consumers receive messages, need change configuration each consumer has it's own queue. need publish message through exchange deliver message of queues of consumers.

the easiest way fanout exchange type.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -