If this is a bug report, please fill out the following:
Version of Ruby: jRuby 9.3.7.0
Version of Kafka: 3.2.1
Version of ruby-kafka: 1.5.0 (gem)
Please verify that the problem you're seeing hasn't been fixed by the current master of ruby-kafka.
Steps to reproduce
not so easy to reproduce because raise of CoordinatorNotAvailable is the precondition.
In this case possibly caused by a crashed cluster node, but failover in cluster seemed to function correctly.
The crashed cluster node was the first entry in configured nodes list.
Currently the problem occurs during call of Producer.init_transactions.
If the method Cluster.get_coordinator raises the exception CoordinatorNotAvailable then retries are executed without any limit.
So in the result the application hangs, but a global reconnect to Kafka could have fixed the problem if call of init_transactions would return with error/exception.
cluster.rb: line 504
rescue CoordinatorNotAvailable
@logger.debug "Coordinator not available; retrying in 1s"
sleep 1
retry
``
###### Expected outcome
There should be a limited amount of retries and a raise of exception to caller if the problem persists after multiple retries.
###### Actual outcome
The call of Producer.init_transactions hangs infinite if CoordinatorNotAvailable is still present.
If this is a bug report, please fill out the following:
Please verify that the problem you're seeing hasn't been fixed by the current
master
of ruby-kafka.Steps to reproduce
not so easy to reproduce because raise of CoordinatorNotAvailable is the precondition. In this case possibly caused by a crashed cluster node, but failover in cluster seemed to function correctly. The crashed cluster node was the first entry in configured nodes list.
Currently the problem occurs during call of Producer.init_transactions. If the method Cluster.get_coordinator raises the exception CoordinatorNotAvailable then retries are executed without any limit. So in the result the application hangs, but a global reconnect to Kafka could have fixed the problem if call of init_transactions would return with error/exception.
cluster.rb: line 504