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

ISSUE-733: Producer can not reconnect to broker after server restart #263

Open
sijie opened this issue Feb 21, 2022 · 0 comments
Open

ISSUE-733: Producer can not reconnect to broker after server restart #263

sijie opened this issue Feb 21, 2022 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Feb 21, 2022

Original Issue: apache#733


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 https://github.com/apache/pulsar-client-go/blob/1df5596aa7a351c6f43edb53f54b2a14b83b0073/pulsar/producer_partition.go#L264-L265. And the connection is closed by another goroutine because of connection.handleSendError https://github.com/apache/pulsar-client-go/blob/1df5596aa7a351c6f43edb53f54b2a14b83b0073/pulsar/internal/connection.go#L793. 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

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