Skip to content

Conversation

@RobertIndie
Copy link
Contributor

Cherry-pick: #309

Motivation

The producer.DisposeAsync runs in the background, while the consumer does not. This can cause inconsistent behavior between closing the producer and the consumer. For example, if a user wants to wait for the result of consumer.DisposeAsync using GetAwaiter, it may lead to a deadlock if ConfigureAwait(false) is not set. It is better to run this dispose in the background to avoid deadlock issues and to ensure consistent behavior with the producer.


Co-authored-by: Vladimir Shchur [email protected]
(cherry picked from commit 096bc23)

RobertIndie and others added 2 commits April 15, 2025 18:41
)

* Make consumer DisposeAsync execute in the backgroundTask

* Update pulsar test image

---------

Co-authored-by: Vladimir Shchur <[email protected]>
(cherry picked from commit 096bc23)
@RobertIndie RobertIndie marked this pull request as ready for review April 15, 2025 10:57
@RobertIndie
Copy link
Contributor Author

Could you help take a look at the CI error? Seems not related to this PR.

@Lanayx
Copy link
Member

Lanayx commented Apr 15, 2025

@RobertIndie Ubuntu image needs to be updated

@RobertIndie
Copy link
Contributor Author

@RobertIndie Ubuntu image needs to be updated

Thanks. The CI has passed

@Lanayx Lanayx merged commit 0be2f65 into fsprojects:2.x Apr 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants