On Wed, Jun 13, 2012 at 9:21 PM, gilboy <[email protected]> wrote:
> Thanks for your input on this thread Claus.
>
> Just to confirm I understand you correctly, the Consumer would look
> something like:
>
> /class CustomConsumer extends DefaultConsumer implements Runnable{
>
> ExecutorService service;
>
> CustomConsumer(EndPoint endPoint, Processor processor){
> super(endPoint, processor);
> }
>
> protected void doStart() throws Exception{
> super.doStart();
> executor = getCamelContext().getExecutorServiceManager()
> .newFixedThreadPool(this, "ConsumerThread", 1)
> executor.execute(this);
> }
>
> public void run(){
> //Do Processing
> }
> }/
>
>
Yes and then stop the executor in the doStop method, there is a method on
executor service manager to do that (eg shutdown)
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Component-Consumer-Threading-Question-tp5714233p5714452.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