<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Actually, rereading, perhaps my solution is different from yours�</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Michael Laing &lt;<a href="mailto:Michael.Laing@nytimes.com">Michael.Laing@nytimes.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> rabbitmq &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Fri, 24 Aug 2012 13:54:15 -0400<br><span style="font-weight:bold">To: </span> johnson &lt;<a href="mailto:johnson@edocom.cn">johnson@edocom.cn</a>&gt;, rabbitmq &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> Re: [rabbitmq-discuss] How to achieve HA consumers?<br></div><div><br></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>I use your option 1: below, which works well.</div><div><br></div><div>All critical services drive from HA queues and have at least one worker (consumer) connected to each node in the cluster. RabbitMQ round-robins messages to the workers. If a worker or node fails, its message is routed to another worker.</div><div><br></div><div>Michael</div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> johnson &lt;<a href="mailto:johnson@edocom.cn">johnson@edocom.cn</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> johnson &lt;<a href="mailto:johnson@edocom.cn">johnson@edocom.cn</a>&gt;, rabbitmq &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Fri, 24 Aug 2012 12:30:01 -0400<br><span style="font-weight:bold">To: </span> rabbitmq &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> [rabbitmq-discuss] How to achieve HA consumers?<br></div><div><br></div><div><style>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        LINE-HEIGHT: 1.5; FONT-FAMILY: ??; COLOR: #000080; FONT-SIZE: 10.5pt
}
</style><meta name="GENERATOR" content="MSHTML 8.00.7601.17874"><div style="MARGIN: 10px"><div>Hi,</div><div>&nbsp;</div><div>One problem I encountered is how to achieve HA consumers. My situation is 
the following.</div><div>&nbsp;</div><div>I installed&nbsp;1 consumer in&nbsp;a&nbsp;server to consume the messages. 
But in the production environment,&nbsp;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&nbsp;receive 
the&nbsp;messages simultaneously, the order cannot be reserved.</div><div>&nbsp;</div><div>Maybe the following 2 way can work.</div><div>1: At the same time, the server only sends&nbsp;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 <span id="result_box" lang="en" class="short_text" closure_uid_hna1tc="117" a="undefined" c="4"><span closure_uid_hna1tc="201">not 
concurrently. Once 1 consumer crashes, the remaining consumer can still 
work.</span></span></div><div><span lang="en" class="short_text" closure_uid_hna1tc="117" a="undefined" c="4"><span closure_uid_hna1tc="201"></span></span>&nbsp;</div><div><span lang="en" class="short_text" closure_uid_hna1tc="117" a="undefined" c="4"><span closure_uid_hna1tc="201">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.</span></span></div><div>&nbsp;</div><div>I have searched a lot of RabbitMQ docs and couldn't find useful info. Could 
anyone can give me some clue? Thanks a lot.</div><div>&nbsp;</div><div><hr style="WIDTH: 210px; HEIGHT: 1px" align="left" color="#b5c4df" size="1"></div><div><span>johnson</span></div></div></div></span></div></div></span></body></html>