apache / apache/pulsar-client-go
Unsubscribe from 1..n topic(s) in multi-topic/regexp subscription
- Dominant language
- Go
- Stars
- 745
- Forks
- 389
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 3
Description
Is there a way to unsubscribe from some topics in multi-topics subscription?
```go
consumer, err := pulsarClient.Subscribe(pulsar.ConsumerOptions{
Topics: []string{"topic1", "topic2", "topic3"},
// TopicsPattern: "topic*",
SubscriptionName: "test-subscription",
Type: pulsar.Shared,
SubscriptionInitialPosition: pulsar.SubscriptionPositionEarliest,
})
// TODO
consumer.UnsubscribeTopic("topic1","topic2")
consumer.CloseTopic("topic1", "topic2")
```
Contributor guide
Research direction
Start by tracing the Consumer returned by Subscribe with multiple Topics or a TopicsPattern, then examine the proposed consumer.UnsubscribeTopic and consumer.CloseTopic entry points. Determine the expected behavior when selected topics are removed while others remain; done means the issue's requested selective unsubscribe or close behavior is defined and verified without disrupting the remaining subscription.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend-api-design, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100