[ 
https://issues.apache.org/jira/browse/CAMEL-11563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-11563:
--------------------------------
    Estimated Complexity: Moderate  (was: Unknown)

> Add predicate option to @Consume so the bean is only called if its evaluated 
> to true
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-11563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11563
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>             Fix For: Future
>
>
> This allows users to specify multiple @Consume on POJO beans methods so they 
> can consume from the same endpoint but have it call different method 
> depending on the predicate.
> {code}
> @Consume("jms:queue:cheese", predicate = "${body} contains 'blue'")
> public void blueCheese(String body) {
>    ...
> }
> @Consume("jms:queue:cheese", predicate = "${body} contains 'hawaii'")
> public void hawaiiCheese(String body) {
>    ...
> }
> {code}
> The predicate can be evaluated using the simple language, so users can do 
> basic predicates.
> If no predicates matches then the exchange is silently dropped. If 1 or more 
> predicates matches then we should either
> - send to first matching
> - send to all matching in sequence (need to do defensive copy to prevent side 
> effects) also mind of streaming, so users may need to turn on stream caching, 
> and we should ensure that its part of the POJO consuming (I cannot remember)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to