camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jyrki Ruuskanen (JIRA)" <>
Subject [jira] [Commented] (CAMEL-9262) stopOnSuccess in Multicast, RecipientList
Date Tue, 27 Oct 2015 15:58:27 GMT


Jyrki Ruuskanen commented on CAMEL-9262:

This seems to be possible with nested doTrys, but the nesting will quickly get deep. Also,
handled(false) in doCatch, which allows us to fall back to context level error handler, seems
to be deprecated.

{code:title=Nested doTry example}
   .log("connecting #1")
      .log("connecting #2")

> stopOnSuccess in Multicast, RecipientList
> -----------------------------------------
>                 Key: CAMEL-9262
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Jyrki Ruuskanen
>            Priority: Minor
> Let's say we have an endpoint where we should send a message and if sending fails there
are a number of fallback endpoints we should try stopping after the first successful sending
(=no exception thrown during sending).
> This sounds like a case for doTry..doCatch, but then we can't use defaultErrorHander
and friends.
> I think it would look quite right if we could say .stopOnSuccess() or .shortCircuit()
on multicast and have it stop after the first successful send.

This message was sent by Atlassian JIRA

View raw message