Kafka-connect, Bootstrap broker disconnected
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Apache Kafka Connect, commonly referred to as Kafka Connect, is a tool within the Kafka ecosystem designed for scalable and reliable streaming of data between Apache Kafka and other data systems such as databases, key-value stores, search indexes, and file systems. Using Kafka Connect, you can easily import entire databases into Kafka and export Kafka topics into downstream systems.
What is Kafka Connect?
Kafka Connect is a component of Apache Kafka that simplifies adding and managing connectors. Connectors are reusable producers or consumers that link Kafka topics to existing applications or data systems. For example, a database connector might capture every change to a database so that other systems can respond to those changes in real-time.
Kafka Connect operates in two modes:
- Standalone Mode: Ideal for running a single worker. It's mostly used for development and testing.
- Distributed Mode: Used for scalable production deployments. This mode supports a large number of workers and provides high availability and scalability.
Common Issues in Kafka Connect: Bootstrap Broker Disconnected
One common issue encountered with Kafka Connect is losing the connection to the Kafka cluster. This problem, usually reported as "Bootstrap broker disconnected", indicates that the connect workers are unable to establish or maintain a connection to the Kafka broker specified in the bootstrap servers list.
Causes and Resolutions
Network Issues
The most common cause of this problem is network related. Checking network connectivity and firewall rules often resolves this issue.
Broker Settings
Configuration mismatch between Kafka brokers and Kafka Connect worker. Ensure configurations like security.protocol, ssl.truststore.location, and similar settings are correctly aligned on both sides.
Resource Limits
Resource limitations on Kafka Connect nodes or Kafka brokers can cause connections to drop unexpectedly. Monitoring and reallocating resources (CPU, memory) can help mitigate this issue.
Technical Example
If your Kafka Connect worker starts showing a "Bootstrap broker disconnected" error, start by checking your worker’s connect-distributed.properties or connect-standalone.properties configuration file:
Make sure that the bootstrap.servers property is correctly pointing to the right Kafka brokers and that the network path between your connect workers and these brokers is clear and without restrictions.
Additional Considerations
When setting up Kafka Connect, it's crucial to monitor and manage the stream's performance and ensure the system's resilience and fault tolerance. Below are key strategies to consider:
- Scaling Connectors and Tasks: Depending on the workload, you might need to adjust the number of workers or task configurations.
- Error Handling: Proper error handling and dead-letter queues can prevent incorrect data propagation and make the system more robust.
- Monitoring: Implement comprehensive monitoring to track connector health, data flow rates, and error rates.
Summary Table
| Issue | Potential Cause | Suggested Resolution (short-term/long-term) |
| Bootstrap Broker Disconnected | Network Problems | Verify network connectivity and firewall settings. |
| Configuration Mismatch | Align connect-*.properties settings with broker. | |
| Resource Limits | Optimize resource allocation; consider scaling up. |
Exploring and addressing these fundamental aspects will enhance your Kafka Connect deployment, ensuring a robust, efficient, and reliable data integration layer in your infrastructure.

