activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: ActiveMQ MessageListener can't differentiate between command and text message
Date Wed, 07 Aug 2013 23:05:39 GMT
Don't need to use nio:// on the client side.


Your best bet is to create  unit test that can reproduce it.
Start here:
http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java?view=markup

and here:
http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java?view=markup


On Wed, Aug 7, 2013 at 3:44 PM, sumit.wattal <sumit.wattal24@gmail.com>wrote:

> 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.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message