[ 
https://issues.apache.org/jira/browse/CAMEL-12652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563970#comment-16563970
 ] 

Ajay Cherukuri edited comment on CAMEL-12652 at 7/31/18 4:51 PM:
-----------------------------------------------------------------

I am using this component in Talend.

org.apache.camel.CamelContext camelContext = new 
org.apache.camel.impl.DefaultCamelContext();
 globalMap.put("camelContext", camelContext);

camelContext.addComponent("rabbitmq", new 
org.apache.camel.component.rabbitmq.RabbitMQComponent());

org.apache.camel.ConsumerTemplate consumer = 
camelContext.createConsumerTemplate();

camelContext.start();
 Object message = consumer.receiveBody(context.RMQ_URI, String.class);

RMQ_URI: 
"rabbitmq://localhost/manualackexc?routingKey=myrouting&queue=myqueue&autoDelete=false&autoAck=false&prefetchEnabled=false&exchangeType=topic"

I have mentioned autoDelete=false, but rabbitmq is deleting the message from 
the queue.


was (Author: ajaycherukuri):
I am actually using this component in Talend.

org.apache.camel.CamelContext camelContext = new 
org.apache.camel.impl.DefaultCamelContext();
globalMap.put("camelContext", camelContext);

camelContext.addComponent("rabbitmq", new 
org.apache.camel.component.rabbitmq.RabbitMQComponent());

org.apache.camel.ConsumerTemplate consumer = 
camelContext.createConsumerTemplate();

camelContext.start();
Object message = consumer.receiveBody(context.RMQ_URI, String.class);

RMQ_URI: 
"rabbitmq://localhost/manualackexc?routingKey=myrouting&queue=myqueue&autoDelete=false&autoAck=false&prefetchEnabled=false&exchangeType=topic"

I have mentioned autoDelete=false, but rabbitmq is deleting the message from 
the queue.

> Acknowledgement in RabbitMQ and Camel
> -------------------------------------
>
>                 Key: CAMEL-12652
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12652
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-rabbitmq
>    Affects Versions: 2.21.1
>            Reporter: Ajay C
>            Priority: Major
>
> Currently, RabbitMQ component is auto acknowledging the message as soon as 
> camel reads it. I would like acknowledge the consumption of the message only 
> if i am successful in processing the message after the consumption. Can you 
> please add Manual ack feature in camel-rabbitmq.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to