-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
In KafkaJS we make use of the consumer.group_join
event for our application to know a consumer is ready to receive messages.
consumer.on(consumer.events.GROUP_JOIN, (event: ConsumerGroupJoinEvent) => {
// inform app this consumer is ready
});
Per #38, the on
methods don't appear to be on the immediate road map.
About the on methods, we don't plan to implement them yet.
I'm wondering if you have an alternative approach we can use to ascertain consumer readiness?
Originally we were using this:
consumer.assignment().length > 0
Unfortunately, it turns out that when you have a topic with more consumers than partitions, the consumers that don't get a partition also never satisfy this condition.
I see we get log entries:
{
"message": "Consumer connected",
"extra": {
"fac": "BINDING",
"name": "undefined#consumer-1"
}
}
...but even if we were to hijack these events with our own Logger, I see no way to tie the name
back to the consumers created (in our case we may have dozens).
Metadata
Metadata
Assignees
Labels
No labels