Hi

You need to set this on the broker side, it's the one that does the
redelivery.
Every broker has their own settings for DLQ and redelivery.

On Mon, Mar 11, 2024 at 2:20 PM Ephemeris Lappis <ephemeris.lap...@gmail.com>
wrote:

> Hello.
>
> It seems that the JMS consumer ignores the redelivery conditions that
> I set on my route :
>
>         <route id=" fifi1-jms">
>             <from
> uri="jms:fifi1?connectionFactory=#aliceJMS&amp;transacted=true" />
>             <transacted />
>             <onException>
>                 <exception>java.lang.Exception</exception>
>                 <redeliveryPolicy disableRedelivery="true" />
>                 <rollback markRollbackOnly="true" />
>             </onException>
>             <convertBodyTo type="String" />
>             <choice>
>                 <when>
>                     <simple>${body} == 'BAD'</simple>
>                     <log message="It's bad !" />
>                     <transform>
>                         <groovy>0 / 0</groovy>
>                     </transform>
>                 </when>
>             </choice>
>             <log message="Message has been processed : ${body}" />
>         </route>
>
> In fact, the message is not rolled back but delivered 7 times. I'd
> like the rollback put the message to a DLQ queue at the first
> execution.
>
> I've tried with/without "transacted" option or/and statement, and
> with/without "rollback" but it doesn't change anything...
>
> I also switched between "disableRedelivery" and "maximumRedeliveries"
> : no difference.
>
> I've probably misunderstood how it works :( !
>
> Any experts for help ?
>
> Thanks in advance.
>
> Regards.
>


-- 
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to