> The key is "as fast as possible" without having to start up another webapp.  
> I guess the question is if a camel supports multiple routes given a single 
> context and if each route in the same context is handled by a dedicated 
> thread?
Yes excatly. You can define multiple froms in a single camel context
and each JMS listener is their own dedicated worker thread.

If using Spring DSL just add multiple <route> elements
<camelContext>
   <route>
    <from uri="x">
   <to uri="xxx">
   </route>

   <route>
    <from uri="y">
   <to uri="yyy">
   </route>
</camelContext>


In Java DSL you can just add multiple from in the same route builder
configure() method
public void configure() {
from(x).to(xxx);

from(y).to(yyy);
}

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/



On Thu, Nov 20, 2008 at 10:37 AM, Coder One <[EMAIL PROTECTED]> wrote:
> The use case is that I need to run a single server (like a webapp) that 
> listens into multiple queues and de-queues messages from a bunch of queues 
> and route them further as fast as possible...
>
> Single process = Single webapp...really...
>
> The key is "as fast as possible" without having to start up another webapp.  
> I guess the question is if a camel supports multiple routes given a single 
> context and if each route in the same context is handled by a dedicated 
> thread?
>
> Thanks,
>
> --- On Wed, 11/19/08, Claus Ibsen <[EMAIL PROTECTED]> wrote:
>
>> From: Claus Ibsen <[EMAIL PROTECTED]>
>> Subject: Re: Competing Consumers Variant
>> To: [email protected], [EMAIL PROTECTED]
>> Date: Wednesday, November 19, 2008, 11:42 PM
>> Hi
>>
>> I think you need a polling consumer then that polls for a
>> given time
>> and then iterate the list of queues. I don't think you
>> kinda like
>> listen to multiple queues in a single thread/process?
>>
>> But I doubt that Camel has a DSL that does this out of the
>> box.
>>
>> And I guess the queues and topics should be durable
>> (persistent) so
>> you wont lose messages while polling other queues
>>
>> You can also try the ActiveMQ user forum as they might have
>> had such a
>> use case before.
>>
>>
>> /Claus Ibsen
>> Apache Camel Committer
>> Blog: http://davsclaus.blogspot.com/
>>
>>
>>
>> On Thu, Nov 20, 2008 at 7:39 AM, Coder One
>> <[EMAIL PROTECTED]> wrote:
>> > Clarification:
>> >
>> > I need to have a single server process listening on
>> multiple JMS queues/topics and then do the routing
>> accordingly...
>> >
>> > Thx...
>> >
>> >
>> > --- On Wed, 11/19/08, Coder One
>> <[EMAIL PROTECTED]> wrote:
>> >
>> >> From: Coder One <[EMAIL PROTECTED]>
>> >> Subject: Competing Consumers Variant
>> >> To: [email protected]
>> >> Date: Wednesday, November 19, 2008, 10:32 PM
>> >> From within a single Route configure() and
>> consumer, is it
>> >> possible to achieve the following:
>> >>
>> >> from("jms.A")...
>> >> from("jms.B")...
>> >> from("jms.C")...
>> >>
>> >> and have all from's execute concurrently?
>> >>
>> >> A bit more advanced, I need a route that can
>> dynamically
>> >> change the from piece based on some configuration
>> setting.
>> >> ie...do a
>> >>
>> >> from(senderList).blabla
>> >>
>> >> and have a separate thread executing each
>> sender...
>> >>
>> >> Thanks...
>> >
>> >
>> >
>> >
>> >
>
>
>
>
>

Reply via email to