You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2007/10/04 13:32:25 UTC

[jira] Commented: (SM-1044) Routing based on message property and set new property on the message in EIP content based router

    [ https://issues.apache.org/activemq/browse/SM-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40258 ] 

Guillaume Nodet commented on SM-1044:
-------------------------------------

Sorry about the delay ...

I agree about the route based on a value, but it should be done in a new predicate that would check the value of the property on the exchange.
It could be done easily with a PropertyExpression, so we would have a PropertyPredicate (as we have an XPathPredicate).
Wanna provide a patch for this one ? I'd be glad to include it.

As for the properties that are set by the predicate, i don't really like that.  Predicates are meant to not mutate the exchange.
You can do that in your own predicate as you suggested yourself.
Can you please expose your exact problems in doing so ?

> Routing based on message property and set new property on the message in EIP content based router
> -------------------------------------------------------------------------------------------------
>
>                 Key: SM-1044
>                 URL: https://issues.apache.org/activemq/browse/SM-1044
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-eip
>    Affects Versions: 3.1
>         Environment: Windows,  JBoss-4.0.4-GA using Servicemix deployer
>            Reporter: Srivatsan Sridharan
>            Priority: Minor
>         Attachments: SwitchPredicate.java, XPathPredicate.java
>
>
> SwitchPredicate.java (available in Servicemix trunk) routes based on the (boolean) value of the property set on the message exchange. It would be good to have it 
> 1) route based on the value (not particularly boolean) of a property set on the message.
> 2) set additional property on the message when the evaluation of property value is true.
> SwitchPredicate.java attached herewith has the changes to address the above.
>  
> XPathPredicate.java attached herewith has the changes to set additional property in the ContentBasedRouter.
> Please let me know if this is the right approach.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.