Hi, I'm trying to make work following components to work together:

- Apache Active MQ 5.13.3
- Qpid JMS Client 0.10.0 (tested on 0.9.0 as well)

The goal is to connect to MS  Azure IoT Hub
<https://azure.microsoft.com/en-us/services/iot-hub/>   using the Qpid JMS
client while running ActiveMQ for legacy reasons (mainly message
persistence). Both components are used as maven dependencies of my bundle.
This bundle creates and maintains bridges between remote server and local
client. So it is responsible for the whole communication starting/closing
stuff.

When the bridge is created I pass the JmsConnectionFactory instance as
QueueConnectionFactory to the bridge. Later I want to open the connection
and I face the following issue:

*The connect method on the connection just hangs when called.* And I suppose
it is connected to the clientID problem.

If the clientID property is set on the JmsConnectionFactory, the Connection
class cannot be instantiated, because the process hangs in the
configureConnection() method.

On the other hand, when the clientID is set to the Connection instance
directly, JmsQueueConnection instance can be created. But the process hangs
once setClientId() is called on the instance. (It leads to the connect()
method of JmsConnection and that leads to a freeze on a synced future.)

If no ID is assigned the process goes seemingly fine. But the proces hangs
in the Connection.start() method which leads to connect() method call on
JmsConnection and then is synced on a lock and gets never unlocked again.

And lastly if none of those methods is called by my code, the process hangs
later anyway, because of the connect() method being called when Session is
instantiated on the connection or so...

This is the part of code where it gets stuck on the *request.sync()* call:

void createResource(JmsResource resource, ProviderSynchronization
synchronization) throws JMSException {
        checkClosedOrFailed();

        try {
                ProviderFuture request = new ProviderFuture(synchronization);
                requests.put(request, request);
                try {
                        provider.create(resource, request);
                        request.sync();
                } finally {
                        requests.remove(request);
                }
        } catch (Exception ex) {
                throw JmsExceptionSupport.create(ex);
        }
}

I'd like to point out that the communication works fine if I use only Qpid
JMS client and proton-j to connect to the IoT Hub in a separate project
using the same credentials.

Thanks for any help!




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to