Overview
From Gateway 3.20.0, networking is configured per listener withGATEWAY_LISTENER_<NAME>_* variables. The global GATEWAY_PORT_*, GATEWAY_ADVERTISED_HOST, GATEWAY_ROUTING_MECHANISM and GATEWAY_SECURITY_PROTOCOL variables — the legacy network configuration — are deprecated and will be removed in Gateway 3.23.
This guide shows how to switch an existing deployment to listener configuration. For how the legacy mode behaves and the full deprecated variable reference, see Legacy network configuration.
Listener configuration removes the inference behavior of legacy network configuration — you set every relevant value explicitly.
Map legacy variables to listener variables
The legacy network variables internally create a single listener namedDEFAULT. Use this mapping as a reference:
| Legacy variable | Listener equivalent |
|---|---|
GATEWAY_BIND_HOST | GATEWAY_LISTENER_<NAME>_BIND_ADDRESS |
GATEWAY_ADVERTISED_HOST | GATEWAY_LISTENER_<NAME>_ADVERTISED_HOST |
GATEWAY_PORT_START and GATEWAY_PORT_COUNT | GATEWAY_LISTENER_<NAME>_PORTS |
GATEWAY_ADVERTISED_SNI_PORT | GATEWAY_LISTENER_<NAME>_PORTS (use advertised:local format) |
GATEWAY_ROUTING_MECHANISM | GATEWAY_LISTENER_<NAME>_ROUTING (host is now called sni) |
GATEWAY_SECURITY_PROTOCOL | GATEWAY_LISTENER_<NAME>_SECURITY_PROTOCOL |
GATEWAY_ADVERTISED_HOST_PREFIX and GATEWAY_SNI_HOST_SEPARATOR | GATEWAY_LISTENER_<NAME>_ADVERTISED_HOST_PATTERN and GATEWAY_LISTENER_<NAME>_BOOTSTRAP_HOST_PATTERN |
GATEWAY_SSL_CLIENT_AUTH | GATEWAY_LISTENER_<NAME>_SSL_CLIENT_AUTH |
GATEWAY_SECURITY_MODE, GATEWAY_ACL_ENABLED, GATEWAY_SSL_KEY_STORE_*, GATEWAY_SSL_TRUST_STORE_*, and all KAFKA_* connection variables.
If your deployment still uses a
DELEGATED_SASL_PLAINTEXT or DELEGATED_SASL_SSL security protocol, migrate it first: the listener SECURITY_PROTOCOL only accepts PLAINTEXT, SSL, SASL_PLAINTEXT or SASL_SSL. Set GATEWAY_SECURITY_MODE=KAFKA_MANAGED and use the plain protocol (SASL_PLAINTEXT or SASL_SSL) on the listener. See Migrate security mode.Worked example
This legacy network configuration:GATEWAY_PORT_START=6969withGATEWAY_PORT_COUNT=5maps to the port range6969-6973.- The
:443suffix replacesGATEWAY_ADVERTISED_SNI_PORT=443. Gateway listens locally on ports6969-6973but advertises port443to clients. GATEWAY_ADVERTISED_HOST_PREFIXandGATEWAY_SNI_HOST_SEPARATORare replaced by explicit host patterns using template variables.
Behavior differences to plan for
Three behaviors change when you migrate:-
Security mode and ACL flag have to be set explicitly. Listener configuration does not infer
GATEWAY_SECURITY_MODEorGATEWAY_ACL_ENABLEDfrom the backing Kafka cluster. Set both:GATEWAY_SECURITY_MODEtoGATEWAY_MANAGEDorKAFKA_MANAGED.GATEWAY_ACL_ENABLEDtotrueorfalse(typicallytrueforGATEWAY_MANAGEDandfalseforKAFKA_MANAGED).
-
SNI host patterns have changed. The default advertised host pattern is now
broker-{{physicalCluster}}-{{nodeId}}.{{advertisedHost}}. This differs from the previous default built fromGATEWAY_ADVERTISED_HOST_PREFIX(defaultbroker) andGATEWAY_SNI_HOST_SEPARATOR(default-). If your DNS records and TLS certificates match the old pattern, either update them or set the pattern explicitly to reproduce it: -
mTLS configuration is per listener. Set
GATEWAY_LISTENER_<NAME>_SSL_CLIENT_AUTHfor each listener (for example,GATEWAY_LISTENER_EXTERNAL_SSL_CLIENT_AUTH=REQUIRE). The globalGATEWAY_SSL_CLIENT_AUTHis ignored in listener configuration.
Verify the migration
Restart Gateway and check the startup logs. Confirm that:- The legacy deprecation warning (
Legacy environment variables detected (GATEWAY_PORT_START, etc.)) no longer appears. If it does, a legacy variable is still set — Gateway refuses to start when legacy variables and an explicit listener configuration are both present, so unset every legacy variable it names. - The
Computed configurationblock lists each listener (DEFAULTif you kept a single listener) with the ports, advertised host, routing and security protocol you intended.
DEFAULT listener (this output is from Gateway 3.20.0 and may change in later versions):
-L) to confirm the metadata response advertises the expected hostnames and ports.
Related resources
- Legacy network configuration — how the deprecated mode behaves and the full variable reference
- Configure Gateway listeners
- Configure Gateway listener security
- Migrate security mode (v3.10–3.19) — migrate from the deprecated
DELEGATED_*security protocols