Send a message to multiple endpoints based on Header Property

View: New views
6 Messages — Rating Filter:   Alert me  

Send a message to multiple endpoints based on Header Property

by jej2003 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a scenario where I am trying to send a message to multiple endpoints based on a header property.  For example I have a header property named File and FTP, if File=true the message should go to the File endpoint, if FTP=true the message should go to the FTP endpoint and if both are true it should go to both.  A filtering router didn't work because as soon as one matched it stopped trying the others. Is there a way to do this without the need to have an and-filter checking for all properties?

RE: Send a message to multiple endpoints based on Header Property

by Purohit, Manoj R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Filters can be combined using the logic filters, AndFilter, OrFilter and NotFilter.
Not all routers need to use filters but all routers support them. See Filters for information.

 

From: Jamie Johnson [mailto:jej2003@...]
Sent: Tuesday, January 06, 2009 2:11 PM
To: user@...
Subject: [mule-user] Send a message to multiple endpoints based on Header Property

 

I have a scenario where I am trying to send a message to multiple endpoints based on a header property.  For example I have a header property named File and FTP, if File=true the message should go to the File endpoint, if FTP=true the message should go to the FTP endpoint and if both are true it should go to both.  A filtering router didn't work because as soon as one matched it stopped trying the others. Is there a way to do this without the need to have an and-filter checking for all properties?


Re: Send a message to multiple endpoints based on Header Property

by jej2003 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yeah, I am attempting to not have to make a huge and-filter to support this. 

If there is no router that supports sending to multiple places based on an expression (and not stop processing once 1 is found) I will just create separate services for each and fwd the message to all of them and let them do their own filtering....just thought there might be a cleaner way.

On Tue, Jan 6, 2009 at 2:14 PM, Purohit, Manoj R <manoj.r.purohit@...> wrote:

Filters can be combined using the logic filters, AndFilter, OrFilter and NotFilter.
Not all routers need to use filters but all routers support them. See Filters for information.

 

From: Jamie Johnson [mailto:jej2003@...]
Sent: Tuesday, January 06, 2009 2:11 PM
To: user@...
Subject: [mule-user] Send a message to multiple endpoints based on Header Property

 

I have a scenario where I am trying to send a message to multiple endpoints based on a header property.  For example I have a header property named File and FTP, if File=true the message should go to the File endpoint, if FTP=true the message should go to the FTP endpoint and if both are true it should go to both.  A filtering router didn't work because as soon as one matched it stopped trying the others. Is there a way to do this without the need to have an and-filter checking for all properties?



Re: Send a message to multiple endpoints based on Header Property

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jamie,

There is a matchAll flag on the router, which may help. Also mentioned on the list a number of times, try searching for the 'matchAll' and see the use cases.

HTH,
Andrew

RE: Send a message to multiple endpoints based on Header Property

by antoine.borg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And if you want an example of using matchAll, I have one on my blog: http://ricston.com/blog/?p=44
 
HTH

A
 
Antoine Borg, Senior Consultant | Tel: +32 28 504 696 
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoine.borgantoine.borg@... | blog: blog.ricston.com | web: ricston.com 
 


From: Andrew Perepelytsya [mailto:aperepel@...]
Sent: Tuesday, January 06, 2009 9:26 PM
To: user@...
Subject: Re: [mule-user] Send a message to multiple endpoints based on Header Property

Jamie,

There is a matchAll flag on the router, which may help. Also mentioned on the list a number of times, try searching for the 'matchAll' and see the use cases.

HTH,
Andrew

Re: Send a message to multiple endpoints based on Header Property

by jej2003 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

this was exactly what I was looking for.  Thanks!

On Wed, Jan 7, 2009 at 2:49 AM, Antoine Borg <antoine.borg@...> wrote:
And if you want an example of using matchAll, I have one on my blog: http://ricston.com/blog/?p=44
 
HTH

A
 
Antoine Borg, Senior Consultant | Tel: +32 28 504 696 
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoine.borgantoine.borg@... | blog: blog.ricston.com | web: ricston.com 
 


From: Andrew Perepelytsya [mailto:aperepel@...]
Sent: Tuesday, January 06, 2009 9:26 PMSubject: Re: [mule-user] Send a message to multiple endpoints based on Header Property

Jamie,

There is a matchAll flag on the router, which may help. Also mentioned on the list a number of times, try searching for the 'matchAll' and see the use cases.

HTH,
Andrew