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

Inconsistent channel state in confirm mode while reconnecting #186

Open
makometr opened this issue Sep 25, 2024 · 1 comment
Open

Inconsistent channel state in confirm mode while reconnecting #186

makometr opened this issue Sep 25, 2024 · 1 comment

Comments

@makometr
Copy link

makometr commented Sep 25, 2024

While testing reconnction behaviour in attemption loop with help of wi-fi connection drop I had managed to send my test message twice by PublishWithDeferredConfirmWithContext. It was possible due to publishConfirms returned after publish were with size 1 and contains nil pointer in publishConfirms[0] (it is check from example). This situation is possible while channel is not in confirm mode. sorry for bad screen
image
so the next publishing is ok

The Publisher sets a new channel to confirm mode in startPublishHandler function after receiving a reconnect message from the reconnectErrCh channel. The problem is caused that there is a period of time when the channel is ready to send a message, but the publisher has not set the confirm mode yet.

@makometr makometr changed the title Inconsistent channel state in confirm mode while reconcecting Inconsistent channel state in confirm mode while reconnecting Sep 26, 2024
@makometr
Copy link
Author

makometr commented Sep 26, 2024

Please refer to PR #188 and feel free to suggest other solutions. I have tried to provide the simplest fix possible.

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

No branches or pull requests

1 participant