[rabbitmq-discuss] Problems with the Java client and clustering
Matthias Radestock
matthias at lshift.net
Thu Jul 30 03:16:19 BST 2009
Ray,
Ray Krueger wrote:
> The first thing I'm trying to deal with is trying to handle failure
> gracefully. Currently I'm testing a pubsub model with a publisher
> publishing to a topic exchange, and one consumer binding a
> client-named queue to the exchange. The problem I keep seeing is that
> after I stop_app and start_app on the primary node in the cluster, the
> Consumer refuses to reconnect...
>
> The Consumer works great until I bounce the primary "rabbit" node.
> When I try to connect the Consumer after that I get this error.
> {#method<channel.close>(reply-code=404,reply-text=NOT_FOUND - no queue
> 'q1' in vhost '/',class-id=60,method-id=20),null,""}
>
> What am I doing wrong?
Looks like the queue 'q1' is no longer there. I can think of several
reasons for that, but the most likely are that either you didn't declare
the queue as durable (and it resided on the node you bounced and hence
got lots in the restart), or it was declared as exclusive (and resided
on a different node but got deleted due to the consumer disconnecting).
> Sorry for two questions in one email here, but am I correct in
> assuming that I should pass an array of addresses to the
> ConnectionFactory when using a cluster?
Yes, assuming you want the client to try them in turn until it finds one
that it can connect to.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list