Hi

Its the component that have the powers to what threading model it uses.
So you can use a thread pool for your consumers, or whatever you want.

The ScheduledPollConsumer is a schedule based consumer, eg it runs every X
time.
Such as the file consumer, which wakes up, and scans for new files.

I am not sure if that model fits a socket event based model.
What socket framework do you use? Usually they already have a threading
model
for consumers you can tap into, with a worker queue, and worker threads etc.

for example Apache Mina, or Netty is good socket frameworks to look into,
using in your component.

On Fri, Jun 8, 2012 at 8:48 PM, Edwin <[email protected]> wrote:

> Hi Folks,
>
> I am currently developing a Camel component comprising of both consumer and
> producer endpoints. The consumer will ping a Socket connection. When a
> connection has been established, a session is then created
>
> In the system there will be 100+ sessions. I plan to build the Camel route
> dynamically so there will be a route consuming from each session
>
> So for N sessions, there will be N routes and each session and route runs
> on
> it's own thread
>
> Applying threading on the route does not present any issues however this is
> proving more challenging on the consumer.
>
> I have been looking at the ScheduledPollConsumer and I could extend this
> class and override it's run() and make one or two other changes so it fits
> my use case but it's not the cleanest of solutions
>
> I'm wondering if Camel provides anything out of the box that ensures a
> consumer is created in it's own thread?
>
> Any thoughts on this topic are much appreciated,
>
> Thanks,
> Edwin
>
>
>
> In the component, I would like the consumer to consume from each of these
> individual threads however the consumer should have it's own thread to read
> from an individual session thread. So the mapping between session and
> consumer is: N sessions : N consumers. create a route that For the
> consumer,
> i'm wondering is it possible to create a thread for every consumer. The
> application of this component
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Component-Consumer-Threading-Question-tp5714227.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to