Open fd8s0 opened 7 months ago
I suspect that this is since version 2.7.0, due to this change:
Always end streams in rebalance listener, support lost partitions https://github.com/zio/zio-kafka/pull/1089
What I do not understand is that it hangs indefinitely. If a partition is lost, the stream should be interrupted. This should immediately cause an error at the place where the stream is run.
2.6 resumes the stream, so it must be 2.7+ issue
@fd8s0 Since you seem to be able to reproduce the issue quite well, could you confirm that zio-kafka 2.7.5. fixes this issue?
There are a few upgrades of kafka-clients
(apache kafka) versions in between zio-kafka
2.3.2 and 2.7.4: from 3.4.1 to 3.7.0. My suspicion is that besides the issue fixed in #1252 there is also a bug in newer kafka-clients
that causes the connection not to be recovered. If we could try zio-kafka 2.7.5 with an older apache-kafka client, we can rule that out.
Would you be willing to try to reproduce the issue with the older kafka-clients by adding this to your dependencies? I'm not 100% sure if you can just override the version like that, but let's try.
"org.apache.kafka" % "kafka-clients" % "3.4.1"
If we could pinpoint the kafka-clients version that introduces the issue, that would be even nicer.
@svroonland seems still broken in 2.7.5 for me
I rolled back kafka-clients version by version, all the way back to 3.4.1 while having zio-kafka 2.7.5 and in no case it works like in zio-kafka 2.6.
If you're having trouble replicating the issue I can try to help. I don't share my exact setup because I'm relying on a zookeeper instance embedded inside hbase and it's a bit offtopic. I'm adding this on a docker compose with the kafka server
kafka-proxy:
container_name: kafka-proxy
image: grepplabs/kafka-proxy:0.3.8
command: server --bootstrap-server-mapping "kafka:9092,kafka-proxy:9192"
network_mode: "host"
Connect to 9192 port with the client, stop the proxy container for over a minute, then start it again.
Thanks, I'm able to replicate this behavior now.
@erikvanoosten Sure this was intended to be closed by 1252?
@erikvanoosten Sure this was intended to be closed by 1252?
Yes!
Re-opened after discussion. We first want to see if #1252 really helped solve this issue.
Issue was reproduced and (very likely) fixed by #1350 in v2.8.3. I'll try to reproduce with the proxy at some later time, but feel free to beat me to it.
This behaviour doesn't seem to apply when not using a kafka proxy. Connecting directly we observe the stream always recomposes itself.
Example code:
In version 2.3.2 it goes something like this:
In version 2.7.4 it goes: