CAMEL-18275: Address issue of completions not being run in SEDA pipeline#8015
Conversation
When synchronizations are handed over, add a method to allow some housekeeping to be performed. In the OnCompletionProcessor.OnCompletionSynchronizationAfterConsumer this method stores the routeId on the Exchange.
|
There is some analysis in the JIRA issue from Eduard and myself. |
|
🚫 There are (likely) no components to be tested in this PR |
|
My tests for this issue are passing with this PR. Also did some regression testing with another decent size integration. All tests pass. |
|
Thank you for your effort, guys. Looking at the code I assume that all the completions will be executed when the SEDA pipelist gets completed. Is my assumption correct? I want to add here that in case "before consumer" mode is used, I'd expect the completions to be executed before the message gets processed in the next queue of the defined pipeline. Does the fix provide such behavior? |
Yes, this is correct.
Unfortunately not. In fact, the current PR doesn't handle the before consumer mode at all. I can add this but unfortunately the completions are still called at the end of the entire pipeline. The change in the PR doesn't prevent the handover from occurring; it only ensures that when the handed-over completions execute, they will perform the logic for all the routes traveled by the exchange and not only the last one. |
|
Thanks for elaboration. I didn't quite get the following part: "unfortunately the completions are still called at the end of the entire pipeline". Does it mean that it should be like that by design or there some other reasons? I try to understand if my expectation on how it shoudl work with "before consumer" mode are correct and aligned with the design. If they are correct, then I guess, we should be able to find a way to get it work the corret way. |
|
I think #8105 will make the beforeConsumer mode work as expected by preventing the handover. |
When synchronizations are handed over, add a method to allow some housekeeping
to be performed. In the OnCompletionProcessor.OnCompletionSynchronizationAfterConsumer
this method stores the routeId on the Exchange.