Skip to content
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

Use asynchronous signaling to invoke pending send operations when Producer recovered #29

Closed
Havret opened this issue Jan 11, 2020 · 0 comments · Fixed by #31
Closed
Labels
enhancement New feature or request
Milestone

Comments

@Havret
Copy link
Owner

Havret commented Jan 11, 2020

The current implementation of AutoRecoveringProducer is based on retries. When a connection to broker is lost, and the underlying Producer is closed, it will throw ProducerClosedException on each SendAsync or Send call. The exception is caught and after a certain, hard-coded amount of time, the operation is issued again. If the underlying producer was recovered in the meantime, the message should be sent. If however, it is still down, the exception is thrown, and the cycle starts again. This should be replaced with a solution based on signaling (hopefully asynchronous). All pending send operations should wait until the underlying producer is recovered.

Initially I was thinking about using AsyncManualResetEvent but it seems it has a nasty bug that may cause deadlocks.

@Havret Havret added the enhancement New feature or request label Jan 11, 2020
@Havret Havret added this to the MVP milestone Jan 11, 2020
@Havret Havret changed the title Use asynchronous signaling to invoke pending send actions when Producer recovered Use asynchronous signaling to invoke pending send operations when Producer recovered Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant