Hi You need to ask spring-rabbitmq how their auto ack works, but I would assume it would ack it as soon as Camel receive the message (onMessage) like JMS. And that Camel will process the message no matter what.
If you want once and only once semantics then you need something that acks it later (or something like transactional). But distributed messaging and networking is complex, also be prepared for duplicates. See also the acknowledgeMode option in the camel-spring-rabbitmq docs On Fri, Jul 5, 2024 at 2:09 PM Guillem Folch <gfo...@opentext.com.invalid> wrote: > Hi all, > > > I'm currently using a RabbitMQ queue and a client application using SPRING > RABBITMQ component as consumer. > Currently we are not setting any acknowdlege-Mode, so I guess we are using > auto acknacknowledgement , so we let Camel component to manage > automatically the ACK of the message when the consumer receives the > message from the queue. > Our simplified Camel route looks like the following: > > > <route> > <from > uri="spring-rabbitmq:MyExchange?routingKey=MyQueue&queues=MyQueue&concurrentConsumers=20"/> > <process ref="#class:com.acme.MyProcessor"/> > <to uri="direct:someOtherCamleRoute"/> > </route> > > My question is what happens with the flow if the Ack cannot be sent > successfully, for instance because there's a network issue or a problem in > RabbitMQ. > Will be the Camel message aborted? Will continue the flow to the > direct:someOtherCamleRoute? > > I was expecting that in this situation the flow will not continue. But > I've got some customer logs that seem to indicate that the flow continues > and the message is sent to the processor and to the next route. > In this case as the message is not acknowledged in RabbitMQ, after some > time is already available for another consumer and it's duplicating the > message process. > Is this possible? Am I missing something? > > Thanks > Guillem > > > > -- Claus Ibsen ----------------- @davsclaus Camel in Action 2: https://www.manning.com/ibsen2