Hi Rajib, Your original connection URL with cyclecount specified as a failover option is correct and my suggestion about changing the URL to specify cyclecount as a top level option was wrong.
I do apologize for a misleading answer. Kind Regards, Alex On 8 July 2013 10:54, Oleksandr Rudyy <[email protected]> wrote: > Hi Rajib, > > In your producer and consumer URLs you should specify the failover and > cyclecount arguments as 2 separate arguments like in the example below: > > amqp://guest:guest@clientid/? > > failover='roundrobin'&cyclecount='2'&brokerlist='tcp://localhost:5672?retries='2'&connectdelay='1000';tcp://localhost:5673?retries='2'&connectdelay='1000'' > > As for exception, it seems that failover happened in the middle of message > sending operation and the Qpid JMS client threw the exception in order to > notify the application about the failure to send the message to the first > server. > > You can add a try-catch block into your publishing code to catch the > exception and re-try sending the message after re-establishing the > connection. > > Kind Regards, > Alex > > > On 8 July 2013 05:36, <[email protected]> wrote: > >> Hi All, >> >> >> >> I am using qpid 0.22, JMS client and C++ broker. >> >> >> >> I configured broker1 (5672) and broker 2 (5673) and created >> bi-directional dynamic routes of "amq.direct" for these 2 brokers. >> >> >> >> JMS Producer configured with amqp://guest:guest@clientid >> /test?failover='roundrobin?cyclecount='2''&brokerlist='tcp://localhost:5672?retries='2'&connectdelay='1000';tcp://localhost:5673?retries='2'&connectdelay='1000'' >> >> >> >> JMS Consumer configured with amqp://guest:guest@clientid >> /test?failover='roundrobin?cyclecount='2''&brokerlist='tcp://localhost:5673?retries='2'&connectdelay='1000';tcp://localhost:5672?retries='2'&connectdelay='1000'' >> >> >> >> >> >> When I killed broker 5672, produce didn't failover to 5673 and >> disconnected and I see an error: >> >> >> javax.jms.JMSException: Exception when sending message:Command was >> interrupted because of failover, before being sent >> at >> org.apache.qpid.client.BasicMessageProducer_0_10.sendMessage(BasicMessageProducer_0_10.java:243) >> at >> org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:499) >> at >> org.apache.qpid.client.BasicMessageProducer.send(BasicMessageProducer.java:297) >> >> >> >> >> >> Can you someone please let me know how we can make it work ? >> >> >> >> Thanks >> >> >> >> Rajib >> >> >> _______________________________________________ >> >> This message is for information purposes only, it is not a >> recommendation, advice, offer or solicitation to buy or sell a product or >> service nor an official confirmation of any transaction. It is directed at >> persons who are professionals and is not intended for retail customer use. >> Intended for recipient only. This message is subject to the terms at: >> www.barclays.com/emaildisclaimer. >> >> For important disclosures, please see: >> www.barclays.com/salesandtradingdisclaimer regarding market commentary >> from Barclays Sales and/or Trading, who are active market participants; and >> in respect of Barclays Research, including disclosures relating to specific >> issuers, please see http://publicresearch.barclays.com. >> >> _______________________________________________ >> > >
