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

Producer can not reconnect to broker after server restart #733

Open
sunby opened this issue Feb 21, 2022 · 1 comment
Open

Producer can not reconnect to broker after server restart #733

sunby opened this issue Feb 21, 2022 · 1 comment

Comments

@sunby
Copy link

sunby commented Feb 21, 2022

Expected behavior

Producer reconnect to broker after server restart.

Actual behavior

In the current code, I find that if a connection is closed, it will try to stop all producer listeners and consumer handlers registered on it. But if the producer has set the connection to conn and does not register the listener to this connection in

p._setConn(res.Cnx)
p._getConn().RegisterListener(p.producerID, p)
. And the connection is closed by another goroutine because of connection.handleSendError . The producer can not do reconnectToBroker because no signal will sent to connectClosedCh.

Maybe we should check the result of RegisterListener and call ConnectionClosed by manually?

Steps to reproduce

It's not stable to reproduce

System configuration

Pulsar version: 0.7.0

@sunby
Copy link
Author

sunby commented Sep 14, 2022

Fixed in #761 . But AddConsumerHanlder in connection.go may have the same issue.

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 a pull request may close this issue.

1 participant