Hi Team,
We are having reconnection issue in PROD with ServiceBus on one of our
subscription after InvalidDestinationException. We are using
"qpid-jms-client-0.34.0" to connect ServiceBus.
We got InvalidDestinationException at "2018-12-07 16:55:13,228" and after
that application tries to recreate consumer every 10s but it was not able to
recreate upto 4 days.
As we verified the Subscription and Topic were available.
For resolving this issue, we restarted the application and application
resume listening on same subscription. Restarting the application is not
good idea but we didn't have any better solution to fix this critical issue.
PFA "2018-12-07_JMS_Client.log" and "2018-12-07_Proton-J.log" (that wraps
the time when error happened) in "Qpid_Issue.zip" file.
Please find below sourceCode snippet for creating connection and consumer.
Any reasons that you are aware of within Qpid, which can cause this issue
and a possible resolution/work-around?
Our environment: Azure Service Bus with 4 MUs (possibly the MUs were change
near the time, but it can be a coincidence, as the restart has brought the
application to the desired state).
Possibilities:
- network blip
- change of MUs
- disabling the subscription/topic for a small period of time
However, in any of the case above, the connection stays available, and so
the consumer should be recreated after certain attempts.
This is a PROD issue and we are responsible to offer a resolution and
therefore any pointer from your side is more than welcome.
Code to establish connection -->
Hashtable<String, String> hashtable = new Hashtable<>();
hashtable.put("connectionfactory.SBCF", "amqps://"+ SBUS_NAME
+".servicebus.windows.net?transport.tcpKeepAlive=true&amqp.traceFrames=true&jms.validatePropertyNames=false&jms.forceSyncSend=true");
hashtable.put(Context.INITIAL_CONTEXT_FACTORY,
QPID_CONNECTION_FACTORY_CLASS);
Context context = new InitialContext(hashtable);
ConnectionFactory connectionFactory = (ConnectionFactory)
context.lookup("SBCF");
Connection connection = connectionFactory.createConnection(USERNAME,
PASSWORD);
connection.setExceptionListener(this); // Settted ExceptionListener
connection.start();
Code to create consumer @ every 10s -->
Session session = connection.createSession(false,
Session.CLIENT_ACKNOWLEDGE);
Destination destination = session.createQueue(QUEUE_NAME);
MessageConsumer consumer = session.createConsumer(destination);
consumer.setMessageListener(this);
Regards,
Abhishek Kumar
Qpid_Issue.zip
<http://qpid.2158936.n2.nabble.com/file/t396358/Qpid_Issue.zip>
--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]