Skip to content

Conversation

@RobertIndie
Copy link
Contributor

@RobertIndie RobertIndie commented Apr 11, 2025

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.

@RobertIndie RobertIndie marked this pull request as ready for review April 11, 2025 10:16
Copy link
Member

@Lanayx Lanayx left a comment

Choose a reason for hiding this comment

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

Thank you for noticing this

@Lanayx
Copy link
Member

Lanayx commented Apr 12, 2025

@RobertIndie it seems that apachepulsar/pulsar-test-latest-version was deleted recently from docker, so integration tests can't be run, should we use zhaijia/pulsar-test-latest-version? Or maybe ghcr.io/nodece/pulsar-test-latest-version ?

@Lanayx Lanayx merged commit 096bc23 into fsprojects:develop Apr 14, 2025
2 checks passed
RobertIndie added a commit to RobertIndie/pulsar-client-dotnet that referenced this pull request Apr 15, 2025
)

* Make consumer DisposeAsync execute in the backgroundTask

* Update pulsar test image

---------

Co-authored-by: Vladimir Shchur <[email protected]>
(cherry picked from commit 096bc23)
Lanayx pushed a commit that referenced this pull request Apr 16, 2025
…#310)

* Make consumer DisposeAsync execute in the backgroundTask (#309)

* Make consumer DisposeAsync execute in the backgroundTask

* Update pulsar test image

---------

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

* Fix CI

* Update ubuntu image in CI
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