Skip to content
Kafka Is Fun

BeginnerOperations

What ports does a Kafka broker listen on by default, and how are they configured?

Reference answer

A broker's listeners setting defaults to PLAINTEXT://:9092, so 9092 is the default client port. Ports are configured per listener: listeners defines the listener names, security protocols and ports the broker binds to (for example PLAINTEXT on one port and SSL on another), advertised.listeners defines the addresses published to clients and other brokers, and listener.security.protocol.map maps listener names to security protocols (PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL). In KRaft mode the controllers use a listener named in controller.listener.names; the Apache examples use port 9093 for it, but that is an example value, not a default. The Kafka Connect REST API listens on port 8083 by default. Remote JMX is disabled by default; it is enabled with the JMX_PORT environment variable or standard Java system properties, and no default JMX port is documented. Any other port numbers are choices made in each deployment.

Expected key concepts: 9092, listeners, advertised.listeners, listener.security.protocol.map, PLAINTEXT, controller.listener.names, KRaft, 9093, 8083, JMX_PORT

How did that feel?

Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.