Skip to content

CAMEL-18275: Address issue of completions not being run in SEDA pipeline#8015

Merged
klease merged 1 commit into
apache:mainfrom
klease:CAMEL-18275
Aug 3, 2022
Merged

CAMEL-18275: Address issue of completions not being run in SEDA pipeline#8015
klease merged 1 commit into
apache:mainfrom
klease:CAMEL-18275

Conversation

@klease
Copy link
Copy Markdown
Contributor

@klease klease commented Jul 19, 2022

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.

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.
@github-actions github-actions Bot added the core label Jul 19, 2022
@klease klease requested a review from davsclaus July 19, 2022 15:05
@klease
Copy link
Copy Markdown
Contributor Author

klease commented Jul 19, 2022

There is some analysis in the JIRA issue from Eduard and myself.

@github-actions
Copy link
Copy Markdown
Contributor

🚫 There are (likely) no components to be tested in this PR

@jeremyross
Copy link
Copy Markdown
Contributor

My tests for this issue are passing with this PR. Also did some regression testing with another decent size integration. All tests pass.

@klease klease marked this pull request as ready for review August 3, 2022 13:39
@klease klease merged commit fd98cd3 into apache:main Aug 3, 2022
@Gems
Copy link
Copy Markdown
Contributor

Gems commented Aug 3, 2022

Thank you for your effort, guys.
I'd like to understand the way the system is supposed to work after the fix.

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?

@klease
Copy link
Copy Markdown
Contributor Author

klease commented Aug 3, 2022

Looking at the code I assume that all the completions will be executed when the SEDA pipelist gets completed. Is my assumption correct?

Yes, this is 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?

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.

@Gems
Copy link
Copy Markdown
Contributor

Gems commented Aug 3, 2022

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.

@klease
Copy link
Copy Markdown
Contributor Author

klease commented Aug 3, 2022

I think #8105 will make the beforeConsumer mode work as expected by preventing the handover.

@klease klease deleted the CAMEL-18275 branch August 3, 2022 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants