ruby-kafka icon indicating copy to clipboard operation
ruby-kafka copied to clipboard

python: rdkafka_roundrobin_assignor.c:97: rd_kafka_roundrobin_assignor_assign_cb: Assertion `next < rd_list_cnt(&eligible_topic-> members)' failed

Open benjaminelkrieff opened this issue 4 years ago • 1 comments

  • Version of Ruby: 2.5.5
  • Version of Kafka:
  • Version of ruby-kafka: 1.3.0

Hi Everyone.

As the title says, I get the error python: rdkafka_roundrobin_assignor.c:97: rd_kafka_roundrobin_assignor_assign_cb: Assertion `next < rd_list_cnt(&eligible_topic-> members)' failed.

I use kafka in confluent.

A little bit of context, I have a system built with python with a consumer that subscribes to topic.incoming and that produces to topic.outgoing. When I send request to my system through topic.incoming, my system produces a response to topic.outgoing. For testing purposes, I also have an external consumer, also written in python that consumes everything that comes from topic.outgoing. The thing is that we also have a system built with ruby on rails, and that system needs to consume the messages from our python system.

So I wrote the following code:

kafka = Kafka.new(...)
group_id = ...
topic = ...
consumer = kafka.consumer(group_id: :group_id)
consumer.subscribe(:topic)

consumer.each_message {|msg| puts(msg.value)}

And only when I run the last line, (when I call the each_message method) it gives the error, and my container which consumes from topic.incoming crashes.

I tried to understand the error and concluded that maybe I had to clean my topics and my consumers in confluent, which I did. I reinitialized everything, but still I keep getting this error.

Once again, when I create a consumer with python, I have no problem. It's only with the ruby code. When I consume messages directly with the kafka_client and not a consumer, it works though, but the end goal is to use consumers.

I really hope you guys can help me figuring this out.

benjaminelkrieff avatar Jan 19 '21 14:01 benjaminelkrieff

This sounds like a problem in librdkafka.

dasch avatar Feb 01 '21 19:02 dasch

Issue has been marked as stale due to a lack of activity.

github-actions[bot] avatar Jun 17 '23 00:06 github-actions[bot]