apache / apache/pulsar-client-go

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

Open
#1,135 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
745
Forks
389
Avg merge
3d 20h
Merged PRs (30d)
3

Description

#### 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

Contributor guide

Open the contributing guide

Research direction

Start in pulsar/consumer_partition.go around lines 1662-1666, where TopicNotFound currently stops reconnecting, and compare the behavior with the linked Java ConsumerImpl reference at lines 915-917. Trace the consumer state and close handling, then verify that a TopicNotFound leaves the consumer failed and closed rather than merely stopping reconnects.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.