You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Yash Bansal <ya...@gmail.com> on 2022/10/13 16:23:58 UTC

Kafka Client trying to reconnect resulting in application crash

Hello,

I have a Spring Web Application using Kafka. I am using Apache Kafka
Client 3.1.0 to connect to Kafka.
I have noticed that if I give a wrong Kafka port to connect to, the client
keeps on trying to connect to Kafka and at that time I am unable to call my
application API. It returns 404.

So I have below questions:
1. While Kafka client trying to reconnect so frequently, my application is
unable to serve any API requests.
2. How can I mitigate this? If Kafka client unable to connect to broker,
try few times and then stop trying.

P.S.: If I give correct port, then the application starts working fine.

Best Regards
Yash Bansal