apache / apache/pulsar-client-go

Close consumer message channel when consumer closed.

Open
#387 3 comments 1 reaction 0 assignees View on GitHub
area/consumer triage/week-50
Dominant language
Go
Stars
745
Forks
389
Avg merge
3d 20h
Merged PRs (30d)
3

Description

**Is your feature request related to a problem? Please describe.**

lots of consumer code maybe like this:

```go
for msg := range consumer.Chan(){
// consume msg
}
```
if not close channel when consumer close, maybe cause goroutine leak.

**Describe the solution you'd like**

when close a consumer,close the consumer's message channel.

**Describe alternatives you've considered**

**Additional context**

Contributor guide

Open the contributing guide

Research direction

Start from the consumer.Chan() message channel and trace the consumer close path. Check how channel ownership and shutdown are handled, then verify that closing a consumer causes ranging over consumer.Chan() to terminate without introducing sends to a closed channel.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
stream-processing
Issue type
Feature
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.