I don't think the question is quite clear. In JMS you can only consume a
message off a queue once. You can't consume it and leave it on the queue.
Why do want to not ack the message? Queues are like throwing candy into a
room of kindergarten children. All will scramble for the candy but each
piece will get consumed by only one child. The only time JMS messages
aren't caked is when they are failed in delivery. And even then, the only
use case for leaving them on the queue is because of a failed transaction
in a transactional route,

Tell me what is the use case you are trying to implement and I might be
able to help you down another path.

On Saturday, December 21, 2013, Tarun Kumar wrote:

> Hi,
>
> Any help here will be highly appreciated.
>
>
> On Fri, Dec 20, 2013 at 9:55 AM, Tarun Kumar 
> <agrawal.taru...@gmail.com<javascript:;>
> >wrote:
>
> > I am using polling consumer.
> >
> > from("timer://foo?period=5000").bean(cool, "someBusinessLogic");
> >
> > public static class MyCoolBean {
> >
> >   private ConsumerTemplate consumer;
> >
> >    public void setConsumer(ConsumerTemplate consumer) {
> >         this.consumer = consumer;
> >     }
> >
> >    public void someBusinessLogic() {
> >
> >       Exchange exchange
> > =
> consumer.receive("catalogJms:queue:queueName?mapJmsMessage=false&acknowledgementModeName=CLIENT_ACKNOWLEDGE");
> >
> > }
> >
> >
> > Even though i am not sending acknowledgement for received message, each
> > time it is polling different message. Any idea why that's happening?
> >
>


-- 
*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*

Reply via email to