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.
...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).
In KafkaJS we make use of the
consumer.group_join
event for our application to know a consumer is ready to receive messages.Per #38, the
on
methods don't appear to be on the immediate road map.I'm wondering if you have an alternative approach we can use to ascertain consumer readiness?
Originally we were using this:
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:
...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).