activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sumit.wattal" <sumit.watta...@gmail.com>
Subject Re: ActiveMQ MessageListener can't differentiate between command and text message
Date Wed, 07 Aug 2013 22:44:03 GMT
This is how I create my message consumer

ActiveMQConnectionFactory activeMQConnectionFactory = new
ActiveMQConnectionFactory();

activeMQConnectionFactory.setBrokerURL("nio://localhost:61619"));

final Connection connection = activeMQConnectionFactory.createConnection()
;
final Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
;

final Destination destination = new ActiveMQQueue(queueName+
"?consumer.exclusive=true")
final MessageConsumer messageConsumer = session.createConsumer(destination);

Then i set the messageListener for the consumer.

Thanks & Regards,

Sumit




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-MessageListener-can-t-differentiate-between-command-and-text-message-tp4670173p4670179.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message