You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ramon Rosa da Silva (JIRA)" <ji...@apache.org> on 2015/03/11 22:27:38 UTC
[jira] [Commented] (CAMEL-8308) RabbitMQEndpoint: setting
prefetchEnabled=false or prefetchCount=0 (default values) locks all
messages on RabbitMQ
[ https://issues.apache.org/jira/browse/CAMEL-8308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14357639#comment-14357639 ]
Ramon Rosa da Silva commented on CAMEL-8308:
--------------------------------------------
Hello [~dneuge],
The expiration is set in "properties", not in the "header".
I can't reproduce in RabbitMQ 3.1.4, Erlang R16B01, Apache Camel 2.14.1 and amqp-client 3.3.4.
> RabbitMQEndpoint: setting prefetchEnabled=false or prefetchCount=0 (default values) locks all messages on RabbitMQ
> ------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-8308
> URL: https://issues.apache.org/jira/browse/CAMEL-8308
> Project: Camel
> Issue Type: Bug
> Components: camel-rabbitmq
> Affects Versions: 2.14.1
> Reporter: Daniel Neugebauer
>
> If RabbitMQEndpoint is configured with either prefetchEnabled=false or prefetchCount=0 (both are default values), then messages appear to be locked on server-side (getting prefetched with high/no limit?).
> To reproduce:
> # add multiple messages to a RabbitMQ queue which define an expiration header (after expiration, RabbitMQ will remove those message from queue without delivering them to consumers)
> # watch RabbitMQ admin panel, you should see n messages are "Ready", 0 messages are "Unacknowledged"
> # configure & run one concurrent RabbitMQEndpoint from Camel with above settings + autoAck=false and delay/block processing of messages (e.g. by running Thread.wait(10000) in a Processor)
> # watch the admin panel again: 0 messages are "Ready", n messages are "Unacknowledged" - so Camel appears to have prefetched all messages?
> # wait until messages should have expired
> # admin panel still shows all unprocessed messages as unacknowledged although they should have been removed from queue
> # Camel still processes those messages after expiration
> # stop Camel (returns all unacknowledged messages to ready state)
> # admin panel shows that all messages now have been purged from queue (much later than they should have)
> Workaround: Repeating with prefetchEnabled=true and prefetchCount=1 shows only 1 message "unacknowledged" while queue is being processed by Camel, all other messages remain "ready" and expire in time (thus skipping the Camel queue as expected).
> Expected behaviour: If the prefetcher is disabled, no messages should get locked on server-side, so messages can be expired by RabbitMQ as intended by the message sender.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)