This is how I did it - from("file:inbox") .multicast() .to("seda:a") .choice() .when(header("foo").isEqualTo("one")) .to("log:org.apache.camel.DeadLetterChannel?level=error") .otherwise() .to("file://d://log//camel//output1") .to("seda:b") .choice() .when(header("foo").isEqualTo("one")) .to("log:org.apache.camel.DeadLetterChannel?level=error") .otherwise() .to("file://d://log//camel//output2");
Only one step is missing to this. I need to modify the header of the Multicasted message, before it reaches the choice() block. I tried the following - 1) Added a processor before sending the messages to temporary seda queue 2) Added a processor after the seda queue, before the choice() block. In both the cases, messages are not getting filtered. If I set the header prior to multicast, it works. But my requirement is to perform something specific to the endpoints so I need to modify the messages only after multicasting, before reaching the endpoints. Thanks. Regards, Narita ________________________________________ From: Daniel Baptista [daniel.bapti...@performgroup.com] Sent: Thursday, October 27, 2011 4:33 PM To: users@camel.apache.org Subject: RE: Selective Multicast Hi Narita, Sounds like you might want a recipient list. http://camel.apache.org/recipient-list.html They can be used to work with dynamic endpoints. Hope it helps, Dan. -----Original Message----- From: narita bagchi [mailto:narita-bag...@indiatimes.com] Sent: 27 October 2011 11:53 To: users@camel.apache.org Subject: Selective Multicast Is there a way I can selectively multicast? But I do not want to do a multicast-filter like - multicast().filter(header("foo").isEqualTo("bar")).to( "file:outbox1", "file:outbox2", "file:outbox3"); In my case, the destinations (say outbox1, outbox2 and outbox3) are obtained dynamically. ~Narita ________________________________________________________________________ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient’s responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. ***The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review,retransmission,dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.***