skip to content

What does inter.broker.listener.name configure, how does it relate to security.inter.broker.protocol, and what are the constraints when separating broker-to-broker traffic onto its own listener?

level: seniorimportance: should knowfreq 40%

answer

  1. broker-to-broker = replication + coordination
  2. name OR protocol, never both
  3. must be in listeners + protocol map
  4. advertised addr reachable by peers
  5. stage security migrations via rolling restart

basics

~20 s

inter.broker.listener.name selects which named listener brokers use to talk to each other (replication, controller coordination). It is mutually exclusive with security.inter.broker.protocol — you set one or the other. It lets broker-to-broker traffic run on a dedicated, often more-trusted listener separate from client traffic.

solid answer

~50 s

Brokers connect to each other for replication and (pre-KRaft) controller coordination. By default that traffic uses the same listener clients use, with `security.inter.broker.protocol` choosing the protocol (default PLAINTEXT). When you run multiple named listeners, you instead set `inter.broker.listener.name` to point broker-to-broker traffic at a specific listener — typically a dedicated INTERNAL listener on a trusted network. The two configs are **mutually exclusive**: setting both fails startup. Key constraints: the named listener must exist in `listeners` and be in `listener.security.protocol.map`; its advertised address must be reachable by other brokers; and the brokers must hold the credentials required by that listener's protocol (e.g. their own keystore for SSL, or a JAAS entry for SASL inter-broker auth). Isolating inter-broker traffic lets you, say, run mTLS internally while forcing external clients through SASL_SSL, and keeps replication bandwidth off the client-facing path.

go deeper

for a junior

Know that brokers talk to each other and that this config picks the listener they use.

for a middle

Explain the mutual exclusivity with security.inter.broker.protocol and that the listener must be mapped and reachable.

for a senior

Design isolated inter-broker listeners with appropriate protocols and execute staged security migrations.

for a principal

Govern segmentation, credential distribution, and zero-downtime security rollouts across large clusters, including KRaft controller-plane separation.

**What inter-broker traffic is.** Beyond client produce/consume, brokers talk to each other constantly: **replica fetching** (followers fetching from leaders to stay in sync), partition leadership changes, and controller coordination (in ZooKeeper mode the controller pushes metadata to brokers; in KRaft the controller quorum is separate but brokers still replicate). This traffic needs its own security decision. **Two mutually exclusive ways to configure it:** 1. **`security.inter.broker.protocol`** — Pick one of the four protocols directly (default `PLAINTEXT`). Use this when you have a simple single-protocol setup and want broker-to-broker to use that protocol. 2. **`inter.broker.listener.name`** — Name a specific listener (e.g. `INTERNAL`) that brokers should use to reach each other. Use this in multi-listener setups. You must set **exactly one**. Configuring both causes a startup error, because they would give conflicting answers about which endpoint/protocol inter-broker traffic uses. **Why isolate inter-broker traffic onto its own listener:** - **Network segmentation / hardening:** Replication can use mTLS (SSL) on a private VPC listener, while client-facing traffic on a separate listener uses SASL_SSL for the public edge. Each segment gets the appropriate security. - **Bandwidth isolation:** Replication is high-volume; keeping it on a dedicated NIC/listener avoids contending with client traffic. - **Blast-radius control:** A compromised client-facing listener doesn't directly expose the replication channel. **Constraints and gotchas:** - The referenced listener must appear in `listeners` and in `listener.security.protocol.map`. - Its **advertised** address must be routable from *other brokers* (inter-broker connections also follow advertised metadata), so an INTERNAL listener must advertise an in-cluster hostname/IP. - Brokers must possess the credentials that listener's protocol requires. For SSL inter-broker, each broker needs a keystore and the others' CA in their truststore; if `ssl.client.auth=required`, every broker presents its cert to peers (mTLS between brokers). For SASL inter-broker, you configure the inter-broker SASL mechanism (`sasl.mechanism.inter.broker.protocol`) and a JAAS section giving brokers credentials to authenticate to each other. - **Rolling upgrades of security** must be staged: e.g. to migrate inter-broker from PLAINTEXT to SSL you first add the SSL listener everywhere (so all brokers can accept it), then flip `inter.broker.listener.name`, rolling restart by restart — never flip it before all brokers can serve it, or replication breaks and partitions go offline. - In **KRaft** mode there is also `controller.listener.names` for the controller quorum, a distinct concern from `inter.broker.listener.name` (which is for the broker-plane). **Mental model:** `inter.broker.listener.name` answers 'which door do brokers use to talk to each other,' while `security.inter.broker.protocol` answers the same question by naming the protocol directly. Multi-listener clusters use the listener-name form so they can decouple internal and external security.

  • Why can't you set both inter.broker.listener.name and security.inter.broker.protocol?
    They are two ways to specify the same thing — which endpoint/protocol brokers use to reach each other — and would conflict. Kafka enforces mutual exclusivity and fails startup if both are set.
  • How do you safely migrate inter-broker traffic from PLAINTEXT to SSL with no downtime?
    Roll out the new SSL listener to all brokers first (so every broker can both serve and connect to it), then in a second rolling restart set inter.broker.listener.name to the SSL listener. Never switch before all brokers can serve it, or replication breaks.
  • In KRaft mode, is inter.broker.listener.name the same as the controller listener config?
    No. inter.broker.listener.name governs broker-plane traffic; controller.listener.names governs the controller quorum. They are separate listeners with separate security configs.

saying these in an interview costs you the question

  • Setting both inter.broker.listener.name and security.inter.broker.protocol
  • Flipping inter-broker security in a single step instead of a staged rolling restart
  • Pointing inter.broker.listener.name at a listener whose advertised address other brokers can't reach
  • Confusing inter-broker (broker-plane) with the KRaft controller listener
  • Forgetting brokers need their own credentials (keystore/JAAS) to use a secured inter-broker listener

context