Search code examples
jmsactivemq-classicamqpqpid

Client failover for qpid/amqp jms client?


Following the wiki page https://cwiki.apache.org/qpid/amqp-java-jms-messaging-client.html to https://cwiki.apache.org/qpid/connection-url-format.html.

Simple me expected qpid-amqp-1-0-client-jms-0.20-sources.jar to accept the URI format, but it seems to disregard just about everything - especially the "brokerlist" option?

For example:

amqp://guest:guest@nowhere?brokerlist='tcp://localhost:5672;tcp://localhost:15672'&failover='roundrobin'

However the ConnectionFactory insist on using the <clientid> as broker host, and adds default port to it.

I'm sure I'm missing something really obvious here...

Broker is ActiveMQ 5.8.0, BTW.


Solution

  • Connection string you are using is pre-AMQP 1.0, new connection string should be of the following format without brokerlist

    amqp://guest:guest@nowhere?remote-host=default