camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reichert, Andre" <andre.reich...@here.com>
Subject Camel RabbitMQ acknowledge messages
Date Thu, 17 Apr 2014 13:30:32 GMT
Hi,

We are using RabbitMQ for messaging huge amount of data. For good performance multi acknowledgment
of messages is used. Further we send messages from RabbitMQ via EventManager for processing.
After a batch we store results in data base and acknowledge processed messages. 

We would like to use Camel for connection to RabbitMQ but the acknowledgment of messages is
hard coded in RabbitMQConsumer. This class has the implementation of com.rabbitmq.client.DefaultConsumer.handleDelivery
that does acknowledgment of a message right after calling process method. See code snippet
below. Is it possible to have the acknowledgment attached to the Exchange object or have another
possibility to acknowledge messages except auto acknowledgement?

Kind regards
Andre Reichert

Code snippet from org.apache.camel.component.rabbitmq.RabbitMQConsumer

123                 consumer.getProcessor().process(exchange);
124 
125                 long deliveryTag = envelope.getDeliveryTag();
126                 if (!consumer.endpoint.isAutoAck()) {
127                     log.trace("Acknowledging receipt [delivery_tag={}]", deliveryTag);
128                     channel.basicAck(deliveryTag, false);
129                 } 




Andre Reichert
Senior Engineer
Map Community Platform
Phone: +49 6196 589 337


50° 9' 43" N. 8° 32' 1" E
HERE, a Nokia business

Place of Business: HERE Germany GmbH & Co. KG, Am Kronberger Hang 8, 65824 Schwalbach,
Germany  - Commercial Register: Amtsgericht Frankfurt am Main, HRA 43654; USt-ID-No.: DE
259 126 202; Managing Directors: Hans P.J. Gieszen, Robertus A.J. Houben
CONFIDENTIALITY NOTICE 
This e-mail and any attachments hereto may contain information that is privileged or confidential,
and is intended for use only by the individual or entity to which it is addressed. Any disclosure,
copying or distribution of the information by anyone else is strictly prohibited. If you have
received this document in error, please notify us promptly by responding to this e-mail. Thank
you.


Mime
View raw message