activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijayaratha <rat...@wso2.com>
Subject Re: Is there Bug in ActiveMQ 5.4.2 version or 5.5?
Date Fri, 15 Jul 2011 14:34:20 GMT
Hi,
Thanks for reply..
Im not definig any priority..

This is my code..

First i send messages to queue;
 
offer() {
 producer = JMSUtil.createProducer(session,destination,jmsSpec11);
producer.send(objectMessage);
}

Then do a peek on queue, to just retrieve message for a internal process;

 peek() {
 browser = session.createBrowser((Queue) destination);
 Enumeration enumeration = browser.getEnumeration();
 if (enumeration.hasMoreElements()) {            	
 Object msg = enumeration.nextElement();  
........
}
return mesasage;
}

Then doing polling to remove it from queue;
poll(){
  consumer = createConsumer(session,destination,jmsSpec11);
Object msg = consumer.receive();
....
}

i call poll() after peek() method..anyway poll removes the later messages of
the queue..
It shouldn't happen know?

But same code works fine in AMQ 5.3.2 version...

Any clue why this is not working in 5.4.2/5.5 versions?

Thanks
-Ratha.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Is-there-Bug-in-ActiveMQ-5-4-2-version-or-5-5-tp3669599p3670108.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message