<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=GB2312" http-equiv=Content-Type>
<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"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>One problem I encountered is how to achieve HA consumers. My situation is
the following.</DIV>
<DIV> </DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>Maybe the following 2 way can work.</DIV>
<DIV>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 <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> </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> </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> </DIV>
<DIV>
<HR style="WIDTH: 210px; HEIGHT: 1px" align=left color=#b5c4df SIZE=1>
</DIV>
<DIV><SPAN>johnson</SPAN></DIV></BODY></HTML>