node.js - RabbitMQ multi server instances - only one active consumer -


i have node.js server, rabbitmq consumer. want scale app multiple instances, keep consumer active. how can that?

thanks

you should able state want exclusive access queue when start consuming. information available here means first consumer exclusive access, other attempt after rejected.

extract of relevant information provided link below:

consume(short reserved-1, queue-name queue, consumer-tag consumer-tag, no-local no-local, no-ack no-ack, bit exclusive, no-wait no-wait, table arguments) ➔ consume-ok

and exclusive bit information

bit exclusive

request exclusive consumer access, meaning consumer can access queue.

the client may not gain exclusive access queue has active consumers. error code: access-refused


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -