camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Help needed: how to use Camel JMS Client Acknowledge mode for queue consumption
Date Sun, 03 Sep 2017 14:52:14 GMT

You can use transacted=true to use transtanced ack mode which will do
this automatic, to only ACK if success.

The client mode ought only to ack if you call session.acknowledge()
manually via the JMS api, but that is harder to do via Camel as you
dont have easy access to this API and its not really a recommended
mode to be using.

On Thu, Aug 24, 2017 at 7:24 PM, lye <> wrote:
> Hi, Claus, Willem and Camel Friends. I need some help with jms
> acknowledgementModeName client acknowledge. I tried the following code, but
> it always auto acknowledged whenever a message is dropped to the queue (IBM
> websphere MQ)
> Use case: read a message from the MQ without removing it from the queue.
> Then process the message. If no exception is thrown during the entire
> processing route, then acknowledge it. Otherwise, keep it in the queue.
> Code:
> <route id="Case-Request-Queue-Consumer-Route">
>                         <from
> uri="wmq:queue:{{mq}}?maxConcurrentConsumers={{maxConsumer}}&amp;acknowledgementModeName=CLIENT_ACKNOWLEDGE"
> />
>                         <bean ref="unMarshallMessage" />
>                         <to uri="direct:processMessage" />
>                 </route>
> When the message reaches unMarshallMessage processor bean, it's removed from
> the queue.
> Please let me know what I need to change. I tried searching for client
> acknowledge mode sample code, but couldn't find much info. Any thoughts or
> sample code will be greatly appreciated!
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
----------------- @davsclaus
Camel in Action 2:

View raw message