[rabbitmq-discuss] cluster setup not working
Michael Klishin
michael at rabbitmq.com
Sun Sep 1 00:17:46 BST 2013
mahi e:
> I wrote a sample program to publish message and given connection details of server A ( Server A is down.)
>
> java.net.ConnectException: Connection refused: connect
> at java.net.DualStackPlainSocketImpl.connect0(Native Method)
> at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
> at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:579)
>
> And my assumption is should publish to server B because in cluster setup up and running.
Perhaps I misunderstood your real expectation. Do you expect the client to connect to
B if A is down because it is cluster-aware?
There is a way to provide multiple addresses to ConnectionFactory [1]. Then the first
accessible address should be used *during initial connection*. Clients are not cluster
aware otherwise. It has been discussed whether they should be, so far there is no
clear answer.
1. http://hg.rabbitmq.com/rabbitmq-java-client/file/df853bee2dfd/src/com/rabbitmq/client/ConnectionFactory.java#l487
MK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130901/47857d0f/attachment.pgp>
More information about the rabbitmq-discuss
mailing list