Willem,

I reverted the change below on a private copy of camel-rabbitmq in 
RabbitMQConsumer.class, and reverting that change fixed my problem, allowing me 
to NOT autoAck.  Could you please consider reverting this fix in the code?  
Here is a link to the commit:

https://github.com/apache/camel/commit/87a609c33bb7d0ddc078d2b4cb4027e290aefd82

Also, I noticed that 'isAutoAck()' in RabbitMQConsumer.class is being used as a 
parameter in a call to channel.basicConsume() from doStart() in the same class. 
 This channel class, ChannelN.class, has a property, noAck, which syntactically 
reverses the logic of isAutoAck().  I suspect that this use of isAutoAck() in 
doStart() should be notted ('!') because the logic in ChannelN.class is 
reversed (isAutoAck verses noAck).

Thanks,

John


John H. Clark
Sr. Software Engineer
Digital Marketing Business Unit
Adobe Systems
385.345.1656
ext 51656 (in office)
johcl...@adobe.com
3900 Adobe Way
Lehi, UT 84043  USA
www.adobe.com



-----Original Message-----
From: John H. Clark 
Sent: Wednesday, March 12, 2014 10:40 AM
To: users@camel.apache.org
Cc: 'willem.ji...@gmail.com'
Subject: RE: camel-rabbitmq autoack=false

Willem,

I updated to 2.12.3, and still have the same problem.  I believe there is a bug 
in the code, it camel-rabbitmq-2.12.3.jar, RabbitMQConsumer.class, line 126:


                if (!consumer.endpoint.isAutoAck()) {
                    log.trace("Acknowledging receipt [delivery_tag={}]", 
deliveryTag);
                    channel.basicAck(deliveryTag, false);
                }

I believe there should NOT be a '!' on the check for isAutoAck().

I tried setting autoAck to true when creating the endpoint, but the message 
still gets acknowledged.  I believe this is because there is another use of 
isAutoAck() further down in the same module where it is passed through to an 
AMQP module.

Regardless of whether or not this analysis is correct, when I set autoAck to 
false, my messages are still autoAck-ed.

What do you think?

Thanks,

John


John H. Clark
Sr. Software Engineer
Digital Marketing Business Unit
Adobe Systems
385.345.1656
ext 51656 (in office)
johcl...@adobe.com
3900 Adobe Way
Lehi, UT 84043  USA
www.adobe.com



-----Original Message-----
From: Willem Jiang [mailto:willem.ji...@gmail.com]
Sent: Monday, March 10, 2014 8:24 PM
To: users@camel.apache.org
Subject: Re: camel-rabbitmq autoack=false

Hi,

We have some autoack related issue in camel 2.12.1.
I just checked latest release camel 2.12.3’s code, the autoAck option is set 
rightly.

--
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem



On March 11, 2014 at 9:22:53 AM, John H. Clark (johcl...@adobe.com) wrote:
> I am creating an endpoint as follows using camel-rabbitmq (2.12.2). 
> The endpoint works fine, but appears to be doing an acknowledge even though 
> autoAck=false.
>  
> String endpoint = "rabbitmq://" + host + ":" + port + "/" + exchange + 
> "?username=" + username
> + "&password=" + password
> + "&queue=" + queue + "&vhost=" + vhost + "&routingKey=" + routingKey + 
> "&exchangeType=fanout"  
> + "&durable=true&autoDelete=false&autoAck=false";
>  
> Any ideas or are others experiencing something similar? If it is a 
> bug, any ideas for a workaround?
>  
> Thanks,
>  
> John H. Clark
>  
>  
>  
>  

Reply via email to