apache / pulsar-client-go

Apache Pulsar Go Client Library
https://pulsar.apache.org/
Apache License 2.0
660 stars 335 forks source link

[Bug][Consumer] Should close the consumer when TopicNotFound #1135

Open gunli opened 1 year ago

gunli commented 1 year ago

Expected behavior

We should close the consumer when TopicNotFound. #1134

According to the JAVA client, when TopicNotFound, the consumer is set to state Failed and close.

see: https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L915-L917

Actual behavior

Currently, we just stop reconnecting, see: https://github.com/apache/pulsar-client-go/blob/master/pulsar/consumer_partition.go#L1662-L1666

Steps to reproduce

How can we reproduce the issue

System configuration

Pulsar version: x.y

gunli commented 1 year ago

@RobertIndie