activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramababu Bendalam <>
Subject Re: Unable to consume all messages from the existing connection
Date Wed, 10 Feb 2016 10:00:42 GMT
Connection connection;
Destination queue;
Consumer consumer;

ActiveMQConnectionFactory connectionFactory = new
connection = connectionFactory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
consumer = session.createConsumer(queue);

While creating connection to connectionfactory, it creates a new connection
with my localhostname. 
But i do not want that in my case. As i have already have a connection
created. Is there is a way to use the existing connection instead of
creating a new connection.

In my case the given destination have two connections(one which already
exists and the second one created during the test run) so the messages are
distributed between the two connections and i could not able to retrieve the
exact consumed messages count.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message