On Tue, Jan 29, 2013 at 2:16 PM, AMARNATH, Balachandar
<balachandar.amarn...@airbus.com> wrote:
>
> Hi,
>
> With multicast(), I could achieve run processes concurrently. However, not 
> sure to make another process to wait for completion of previous processes.
>
>
> from("direct:start")
>             .process(new Processor() {
>                 public void process(Exchange exchange) throws Exception {
> // do something                }
>             })
>             .multicast().parallelProcessing().process(new Processor(){
>                 public void process(Exchange exchange) throws Exception {
>                         Thread.sleep(3000);
>                         // do something                        }
>             }).process(new Processor(){
>                 public void process(Exchange exchange) throws Exception {
>                         Thread.sleep(1000);
>                         // do something
>                 }
>             });
>
>
> I have fourth process which I am trying to stop until 2 and 3 completes. I 
> tried with Aggregate() but not successful. Any use case in this line will be 
> helpful

Just add the 4th after the multicast. You can add a .end() to tell
Camel where multicast ends

from X
  to A
  multicast parallel
     to B
     to C
  end
  to D

In the example above, B and C is part of the multicast. And D is only
executed when the multicast is complete.



>
> -----Original Message-----
> From: Willem jiang [mailto:willem.ji...@gmail.com]
> Sent: 29 January 2013 17:03
> To: users@camel.apache.org
> Subject: Re: Concurrent processes
>
> No, if you are just chain the processor together, for one exchange it will be 
> processed one by one.
> But if you have multiple exchanges, they can be processed concurrently.
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
> (English)
>           http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Tuesday, January 29, 2013 at 5:41 PM, AMARNATH, Balachandar wrote:
>
>> Thanks willem Jiang,
>>
>> So, you mean to say that even though, i have specified like 
>> process1().process2().process3(), they will be executed concurrently. If 
>> this is the case, does camel wait for some processes to finish, for 
>> instance, process3 needs inputs from process2 and process1?. I expect camel 
>> to wait for both the processes 1 and 2 to finish before process3 can start.
>>
>> With many thanks
>> Bala
>>
>>
>>
>> -----Original Message-----
>> From: Willem jiang [mailto:willem.ji...@gmail.com]
>> Sent: 29 January 2013 12:19
>> To: users@camel.apache.org (mailto:users@camel.apache.org)
>> Subject: Re: Concurrent processes
>>
>> Processor are supposed to be executed concurrently.
>> You can managed the threads[1] in camel route, and there are some other 
>> camel components (like camel-jms, camel-cxf) have their own thread pool.
>>
>>
>> --
>> Willem Jiang
>>
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://www.fusesource.com | http://www.redhat.com
>> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
>> (English)
>> http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>>
>>
>>
>>
>> On Tuesday, January 29, 2013 at 1:50 PM, AMARNATH, Balachandar wrote:
>>
>> > Hi,
>> >
>> > Is there a way to execute two processes (.process) concurrently with 
>> > camel? If yes, please share the appropriate resources
>> >
>> > With thanks and regards
>> > Balachandar
>> >
>> >
>> >
>> >
>> > The information in this e-mail is confidential. The contents may not be 
>> > disclosed or used by anyone other than the addressee. Access to this 
>> > e-mail by anyone else is unauthorised.
>> > If you are not the intended recipient, please notify Airbus immediately 
>> > and delete this e-mail.
>> > Airbus cannot accept any responsibility for the accuracy or completeness 
>> > of this e-mail as it has been sent over public networks. If you have any 
>> > concerns over the content of this message or its Accuracy or Integrity, 
>> > please contact Airbus immediately.
>> > All outgoing e-mails from Airbus are checked using regularly updated virus 
>> > scanning software but you should take whatever measures you deem to be 
>> > appropriate to ensure that this message and any attachments are virus free.
>>
>>
>>
>>
>>
>>
>> This mail has originated outside your organization, either from an external 
>> partner or the Global Internet.
>> Keep this in mind if you answer this message.
>>
>>
>>
>> The information in this e-mail is confidential. The contents may not be 
>> disclosed or used by anyone other than the addressee. Access to this e-mail 
>> by anyone else is unauthorised.
>> If you are not the intended recipient, please notify Airbus immediately and 
>> delete this e-mail.
>> Airbus cannot accept any responsibility for the accuracy or completeness of 
>> this e-mail as it has been sent over public networks. If you have any 
>> concerns over the content of this message or its Accuracy or Integrity, 
>> please contact Airbus immediately.
>> All outgoing e-mails from Airbus are checked using regularly updated virus 
>> scanning software but you should take whatever measures you deem to be 
>> appropriate to ensure that this message and any attachments are virus free.
>
>
>
>
> This mail has originated outside your organization, either from an external 
> partner or the Global Internet.
> Keep this in mind if you answer this message.
>
>
>
> The information in this e-mail is confidential. The contents may not be 
> disclosed or used by anyone other than the addressee. Access to this e-mail 
> by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately and 
> delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or completeness of 
> this e-mail as it has been sent over public networks. If you have any 
> concerns over the content of this message or its Accuracy or Integrity, 
> please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated virus 
> scanning software but you should take whatever measures you deem to be 
> appropriate to ensure that this message and any attachments are virus free.
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to