apache / apache/pulsar-client-go

Connection health checks

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

**Is your feature request related to a problem? Please describe.**
As an application, I am unable to determine the current state of health of the Pulsar client. If my connection dies, my application ends up in a hanging state with infinite retries. Setting a maximum number of retries through the currently provided interface just causes a hanging state, with no notification that my application can respond to handle the error.

**Describe the solution you'd like**
The Client should have an `ErrorChannel` that my application is able to consume messages from with information about where an error has happened, such as a connection being killed and retries failing. This will allow applications to detect when Pulsar is an unhealthy state and respond appropriately. The errors should identify whether it is a consumer or producer that failed as well, so applications can handle them different.

**Describe alternatives you've considered**
For a Consumer specifically, I tried to patch so the ConsumerMessage channel is closed after a maximum number of retries have failed, but it seems there are still retries from the client end as well.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Client, Consumer, and Producer entry points and the existing retry behavior described in the issue. Determine how connection failures and exhausted retries are currently surfaced. Done means applications can consume an ErrorChannel that identifies the failed connection and whether the consumer or producer was affected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.