apache / apache/cassandra-gocql-driver

Disconnect event notifications

Open
#756 4 comments 0 reactions 0 assignees View on GitHub
api enhancement good first issue
Dominant language
Go
Stars
2.7k
Forks
658
PR merge metrics
No merged PRs in 30d

Description

Hey Crew,

Nice job on gocql, I'm a fan...

For my production services, I could use notification events (via callback or channel) when the gocql client disconnects and reconnects to/from Cassandra. This is useful for higher-level application logic (ie: invoke alarms, stop reading from a durable message queue, etc).

After looking through the code, it looks like the connection information is not publicly exposed. Is there an existing interface to poll the Cassandra connection state? An event-driven interface would be better (to not miss any transitions).

Thanks!
Mark

Contributor guide

Open the contributing guide

Research direction

Start at the gocql client and the Cassandra connection-state and reconnect handling described in the issue. Determine how disconnect and reconnect transitions are represented, then define what a callback or channel interface would need to report and how each transition should be tested. Done means callers can observe every relevant connection change without polling.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.