Skip to content

GH-8577: Deprecate ImapIdleCA.sendingTaskExecutor #8589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

artembilan
Copy link
Member

Fixes #8577

When we process mail messages in async manner, it is possible that we end up in a race condition situation where the next idle cycle closes the folder.

It is possible to reopen the folder, but feels better to block the current idle cycle until we are done with the message and therefore keep folder opened.

  • Deprecate ImapIdleChannelAdapter.sendingTaskExecutor in favor of an ExecutorChannel as an output for this channel adapter or similar async hand-off downstream.
  • Make a default one as a SyncTaskExecutor to make a sense of this deprecation

Fixes spring-projects#8577

When we process mail messages in async manner, it is possible that we end up
in a race condition situation where the next idle cycle closes the folder.

It is possible to reopen the folder, but feels better to block the current idle
cycle until we are done with the message and therefore keep folder opened.

* Deprecate `ImapIdleChannelAdapter.sendingTaskExecutor` in favor of an `ExecutorChannel`
as an output for this channel adapter or similar async hand-off downstream.
* Make a default one as a `SyncTaskExecutor` to make a sense of this deprecation
Copy link
Contributor

@garyrussell garyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just doc polishing.

Co-authored-by: Gary Russell <[email protected]>
@garyrussell garyrussell merged commit 9ffc2db into spring-projects:6.0.x Mar 29, 2023
@artembilan artembilan deleted the GH-8577-6.0.x branch March 29, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants