Hello Mathew..<br><br>Thanks for ur reply.. was out of town so couldn attend to mail earlier.. my comments inline...<br><br><div class="gmail_quote">On Fri, Nov 6, 2009 at 4:56 PM, Matthew Sackman <span dir="ltr">&lt;<a href="mailto:matthew@lshift.net">matthew@lshift.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Arun,<br>
<div class="im"><br>
On Fri, Nov 06, 2009 at 07:58:09AM +0530, Arun Suresh wrote:<br>
&gt; My setup is as follows :<br>
&gt; * 2 RabbitMQ (1.7.0 running on R13B02.1) servers in a cluster (say rabbit@m1,<br>
&gt; rabbit@m2).. both disk nodes.<br>
&gt; * 2 Clients (client@m1 connected to rabbit@m1, client@m2 connected to<br>
&gt; rabbit@m2). I am using the Erlang client (which currently has an issue when<br>
&gt; connecting to a server which is part of a cluster... this I fixed by setting<br>
&gt; &quot;insist = true&quot; in the #&#39;connection.open&#39; record)<br>
<br>
</div>Can you elaborate on this issue a bit? Is this redirection coming back<br>
from the server?<br></blockquote><div>Yes.. I guess its a redirection request coming from the server..<br>basicaly.. the response to my &#39;connection.open&#39; request is a &#39;conncetion.redirect&#39; which on recipt, the client throws an exception and exits.. <br>
ive gotten around this issue by setting &#39;insist = true&#39; in the request record... <br>Maybe ill look at the Java client and see whats done there ? <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im"><br>
&gt; * both clients have processes that have subscribed to the same durable Queue<br>
&gt; (Q) using the same key (K). Q is bound to a durable topic exchange (X). X<br>
&gt; and Q are created on rabbit@m1.<br>
<br>
</div>I don&#39;t understand what you mean by a queue with a key. I take it you<br>
have one topic exchange, one queue bound to the exchange with one<br>
binding key (is this the K you refer to above?), and two consumers on<br>
the queue. (From reading the rest of your email, yes this is clearly<br>
what you mean).<br>
<div class="im"><br>
&gt; Now this is what i do..<br>
&gt; * I bring down rabbit@m1, and client@m1 (They are co hosted... so both are<br>
&gt; brought down together). I do a &quot;rabbitmqctl list_queues&quot; on rabbit@m2... I<br>
&gt; do not see Q there..<br>
<br>
</div>Ok, so the queue has been created on m1, not m2.<br>
<div class="im"><br>
&gt; * I bring rabbit@m1 up again... After which I see Q when i do a &quot;rabbitmqctl<br>
&gt; list_queues&quot;.<br>
&gt; * Before I bring up client@m2, I publish a messge to X with a routing key<br>
&gt; K...<br>
&gt; Issue �: Since client@m2 is up and has a process subscribed to Q, I expect<br>
&gt; that process to receive the message... It doesnt..<br>
<br>
</div>Indeed it won&#39;t.<br>
<br>
Clustering makes all exchanges and queues available on all nodes of the<br>
cluster. *However*, a queue is still located on a single node, even<br>
though it is accessible via all nodes. The queue will be created on the<br>
node the client is connected to when it creates the queue. Thus your<br>
queue has been created on m1, thus it&#39;s accessible from both m1 and m2,<br>
but when m1 goes down, the queue will go down with it.<br>
<br>
>From that point on, m2 has no record of the queue, so msgs sent to X<br>
with K to go to Q will not ever reach Q - as far as m2 is concerned, Q<br>
just does not exist.<br>
<br>
When m1 comes back up, Q will be recovered.<br>
<div class="im"><br>
&gt; Further more... I notice that when i bring client@m2 back up, It restarts<br>
&gt; its subscribers... now all messages published to X with K are sent ONLY to<br>
&gt; client@m2.<br>
<br>
</div>Well client@m1 died. This means its subscriptions to Q were lost - there<br>
is no concept of persisting subscriptions, so when rabbit@m1 comes back<br>
up, the Q will have no consumers at all. If you restart client@m2 then<br>
yes, it&#39;ll recreate its subscription to Q, and thus receive all the msgs<br>
sent to that Q. If you also restart client@m1 then that too will<br>
recreate its subscription to Q and share the msgs with client@m2 as<br>
before.<br></blockquote><div><br>Confirms what ive been thinking... But Is there any way for clients to be notified of dead subscriptions ? That would be helpful, else i would have to keep polling something to get that information.. <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hope this is of help.<br></blockquote><div><br>Definitely.. thanx <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Matthew<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br>