Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Moderate
Description
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.
@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) { ... }
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)