> On 22 Dec 2022, at 14:11, Babak Vahdat <babak.vah...@swissonline.ch.INVALID> > wrote: > > Thanks for the confirmation. > > Yeah OnCompletionProcessor#onFailure callback was exactly where I stumbled > upon as I was debugging. > > Will then create the JIRA with the corresponding fix.
Raised https://issues.apache.org/jira/browse/CAMEL-18835 <https://issues.apache.org/jira/browse/CAMEL-18835> > > — > Babak > >> On 22 Dec 2022, at 13:52, Claus Ibsen <claus.ib...@gmail.com> wrote: >> >> Hi >> >> Yes it appears to be a bug. >> >> In the OnCompletionProcessor the code in onComplete should be copied to >> onFailure. Its the code in the beginning that checks that its only invoked >> at the correct point. >> If you copy that code then it looks like it works. >> >> You are welcome to create a JIRA and "fix" this. And would be good to >> include unit test with the fix. >> >> >> On Thu, Dec 22, 2022 at 7:38 AM Babak Vahdat >> <babak.vah...@swissonline.ch.invalid> wrote: >> >>> And using 3.20.0 here... >>> >>>> On 22 Dec 2022, at 07:36, Babak Vahdat >>>> <babak.vah...@swissonline.ch.INVALID> >>> wrote: >>>> >>>> Hi >>>> >>>> There seems to be a bug in RouteConfiguration#OnCompletion support which >>> in case of an error, then it would run a given Callback as many times as >>> the number of the routes that you have. However if no error then it gets >>> called exactly once which is as expected. >>>> >>>> Here a simple reproducible: >>> https://gist.github.com/bvahdat/db518d4f4abde3ece6c5698f07f8e63d < >>> https://gist.github.com/bvahdat/db518d4f4abde3ece6c5698f07f8e63d> >>>> >>>> Am I right? >>>> >>>> — >>>> Babak >>> >>> >> >> -- >> Claus Ibsen >> ----------------- >> @davsclaus >> Camel in Action 2: https://www.manning.com/ibsen2 >