apache / apache/pulsar-client-go
Return an error when closing the client/producer/consumer fails
- 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.**
If the producer/consumer/client fails to close, the go client only logs the error instead of returning to the user.
https://github.com/apache/pulsar-client-go/blob/e45122c2defc5efd4efc493d0acef278a7ccfc01/pulsar/producer_partition.go#L1295-L1297
**Describe the solution you'd like**
Add the return type to the `Close()` method:
```go
Close() error
```
If there are any errors, return back to the user's code.
Contributor guide
Research direction
Start with pulsar/producer_partition.go around the referenced close handling, then locate the Close() methods for the client, producer, and consumer. Trace how close failures are currently logged and inspect the existing tests for these components. Done means close errors are returned to user code consistently across the requested APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100