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

republishing on reconnect bug in the example #249

Closed
Boris-Plato opened this issue Feb 28, 2024 · 2 comments · Fixed by #250
Closed

republishing on reconnect bug in the example #249

Boris-Plato opened this issue Feb 28, 2024 · 2 comments · Fixed by #250
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Boris-Plato
Copy link
Contributor

Describe the bug

I found this your example on how to implement a beautiful reconnect logic. I assume that pending channel that we use for retry failed delivery on the next session should be moved out of sessions for loop f.e. to the line 93. I made a test simulating error on publishing and the message was not republished to the new session with the current version of an example. When I moved pending channel out of the sessions loop it worked fine. I can provide some code examples if it is required.

Reproduction steps

  1. simulate 1 time error on publishing and call
    pending <- body
    pub.Close()
    break Publish
  2. send a message and check if it was republished and correctly processed with the subscriber

Expected behavior

message republished to the new reconnected session

Additional context

No response

@Boris-Plato Boris-Plato added the bug Something isn't working label Feb 28, 2024
@lukebakken
Copy link
Contributor

Hello, thanks for using this library

If you have a fix for the example, please submit a pull request to fix the example.

@lukebakken lukebakken self-assigned this Feb 28, 2024
@lukebakken lukebakken added this to the 1.9.1 milestone Feb 28, 2024
@Boris-Plato
Copy link
Contributor Author

@Zerpet Zerpet linked a pull request Feb 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants