camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmytro Puzhay (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6784) PollingConsumer.receiveNoWait() never returns null consuming from AMQPComponent endpoint in browsing mode
Date Thu, 24 Oct 2013 11:29:01 GMT

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

Dmytro Puzhay commented on CAMEL-6784:
--------------------------------------

Hi Christian,

using BrowsableEndpoint like below works as expected (browsing mode, messages not removed,
consuming stopped and null is sent when all messages are consumed):

my route:

from(timerEndpoint).bean(myConsumer);

from(directEndpoint) ...

myConsumer class:

.  ..
@Handler
public void onEvent() throws Exception
{
   this.producerTemplate.start();

   for (Exchange exchange : this.browsableEndpoint.getExchanges())
   {
      this.producerTemplate.send(this.directEndpoint, exchange);
   }

   this.producerTemplate.sendBody(this.directEndpoint, null);

   this.producerTemplate.stop();
}

I thinks one can't read from amqp queue in browsing mode with camel polling consumer, because
it technically makes new connection with every poll, which simply forces amqp to start from
first message. Solution would be use one connection for polling.

P.S. Are you actually assigned to the bug? It is Unassigned to me.

> PollingConsumer.receiveNoWait() never returns null consuming from AMQPComponent endpoint
in browsing mode
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-6784
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6784
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-amqp
>    Affects Versions: 2.10.2
>            Reporter: Dmytro Puzhay
>
> I create PollingConsumer for my AMQP queue and consume with receiveNoWait() until null
is received. It worked nicely in default mode, but in browsing mode (queue name suffixed with
"{mode: browse}", see https://qpid.apache.org/books/0.12/Programming-In-Apache-Qpid/html/ch02s04.html
"2.4.3.3. browse" for details) my PollingConsumer keeps running infinitely.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message