On Fri, Oct 29, 2010 at 9:11 PM, Ilya S <devmailboxl...@gmail.com> wrote:
> I'm on Camel 2.3 with ActiveMQ 5.3.2.
>
> I am working with a set of slow JMS consumers, and I'd like to be able to
> create them as polling consumers in my route defined in Java DSL. Is this
> possible?
> Can anyone show an example?
>
> The reason I want polling jms consumers is because I cannot set "prefetch"
> option to 0 with regular consumers. My understanding is that when I define a
> route as follows:
>

Why not? Ask at AMQ forum what and how you can configure AMQ.

> from("activemq:queue.... ")
>  ...
>
> Camel creates a JMS consumer. Is there a way to instruct Camel to create a
> polling consumer here?
>

No you cant as the above syntax will create an event driven JMS consumer.

You can use a timer endpoint to trigger the poll at every X interval.
Then you can pollEnrich from a JMS queue to poll a message (which will
use the polling JMS consumer)
http://camel.apache.org/content-enricher.html

> Thank you very much for your help.
>
> Ilya
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to