[rabbitmq-discuss] How to achieve HA consumers?

johnson johnson at edocom.cn
Fri Aug 24 17:30:01 BST 2012


Hi,

One problem I encountered is how to achieve HA consumers. My situation is the following.

I installed 1 consumer in a server to consume the messages. But in the production environment, to avoid the unexceptional crash of the consumer, I need to install another consumer in another server. However, because the order of the messages are very important, if two consumers receive the messages simultaneously, the order cannot be reserved.

Maybe the following 2 way can work.
1: At the same time, the server only sends the message to 1 consumer. After that consumer return a ACK, the server send the message to another consumer. This means that although two consumers exist, they receive the messages in turn not concurrently. Once 1 consumer crashes, the remaining consumer can still work.

2: 2 consumers work like master-slave. Only 1 consumer works and the other one doesn't consume any message. Once 1 consumer crashes, the remaining consumer will be activated.

I have searched a lot of RabbitMQ docs and couldn't find useful info. Could anyone can give me some clue? Thanks a lot.




johnson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120825/f05ce57a/attachment.htm>


More information about the rabbitmq-discuss mailing list