I have a JAVA client that creates a Durable Queue to send and receive
messages from C++ Broker.
When the senders tries to JAVA MessageProducer sending a message and I kill
the broker,
I see the following log message from qpid.client.
12:54:43.032|SEV|org.apache.qpid.client.AMQConnectionDelegate_0_10|connection
exception: conn:43684706|
But it take one minute before it comes out and let me know that the
connection is broken
via JMSException --  Producer|NODE0|javax.jms.JMSException: Exception when
sending message|

Question 1 - How can I change this timer in my code - set it to 1 seconds or
so?

Question 2- Soon I would like to create two brokers on two different servers
where if one goes down, the client uses the other one. I save in C++ code
that this could be handled in the client -- How would I do this in my JAVA
code and do I need to maintain the connections? And if there is a broker
list, will the MessageProducer.send(message); send the message to one and if
it failed, it would fail over to the next one?

Question 3 - My code does blocking on messageConsumer.receive() - when I
restarted the Broker, I see the following message in the logger - but the
API does not time out, and if I start the senders to send, it never returns
with the next message -- I am not sure why I do not get JMS Exception in the
JAVA client.
What do I need to do to handle the broker disconnects on the receive()?
12:59:28.819|SEV|org.apache.qpid.client.AMQConnectionDelegate_0_10|connection
exception: conn:5c95da38|

Thanks for your help.


--
View this message in context: 
http://apache-qpid-users.2158936.n2.nabble.com/Handling-Broker-Disconnects-on-JAVA-Client-tp7005439p7005439.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to