A producer usually establishes two TCP connections to the broker: one for updating metadata and one for sending messages.
For details on how the Kafka client library manages TCP connections, see How TCP connections are managed by kafka-clients.
A producer usually establishes two TCP connections to the broker: one for updating metadata and one for sending messages.
For details on how the Kafka client library manages TCP connections, see How TCP connections are managed by kafka-clients.