Hello,

I would like to achieve this in a route: Discarding a message based on a
specific criteria.

I know: This is what Message Filter pattern and the .filter() clause do, but
I would rather use .choice()-.when() followed by something like
".to('trashbin:trashbin-endpoint')". This approach ("filtering by content
routing") appears to have the following advantage: If I later decide to
actually _use_ these messages instead of discarding them, I do not have to
modify any predicates or re-arrange filter clauses, I just have to touch one
single ".to()" clause.

My question: Is there a "trash bin" component/endpoint in Camel? 

I tried to use a "dead end" direct endpoint for this purpose, i. e. a direct
endpoint associated with no ".from()" clause whatsover. But I am not sure,
if this has any side effects. The message just should get discarded without
any redelivery attempts, errors or warnings, the exchange should be
considered completed. This should also work for InOut exchanges.

1) Does it make sense?
2) Is there a means to do it in Camel? If so: Which version?
3) If there are multiple ways to do it, what would be the most "elegant"
one, the "best practice"?

Any feedback will be greatly appreciated. :-)

Kind Regards

Marek

-- 
View this message in context: 
http://www.nabble.com/%22Trash-bin%22-endpoint--tp24227620p24227620.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to