Blizzard / Blizzard/node-rdkafka
Add connected event to client
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 403
- PR merge metrics
- No merged PRs in 30d
Description
OS: linux
Node Version : any
NPM Version : any
C++ Toolchain: g++
node-rdkafka version: any
Currently ready event only triggers once getMetadata is complete if the cluster has hundreds of topics it could take O(n) amount of time, that can result in this here timing out: https://github.com/confluentinc/librdkafka/blob/9b72ca3aa6c49f8f57eea02f70aadb1453d3ba1f/src/rdkafka_metadata.c#L85 configuring timeout and increasing is not ideal which is by default 30s. Probing on 10s until metadata is cached on first run is another option which however causes many retries.
A connected event can be emitted before getMetadata in connect() method to be able to implement different handling when metadata call is not necessary.
Contributor guide
Research direction
Start in the client connect() method and trace how the ready event waits for getMetadata; read the linked librdkafka metadata timeout code for context. Define when the proposed connected event should fire before metadata completes, then verify the event behavior against the existing client lifecycle tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100