You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kafka TAV tests (which run in docker) had been failing with:
KafkaJSConnectionError: Connection error: connect ECONNREFUSED 127.0.0.1:9094
even though the client was configured to connect to `kafka:9094`.
Where did the "127.0.0.1" (or "localhost") come from?
The answer is from the Kafka broker metadata, which comes
from the `KAFKA_ADVERTISED_LISTENERS` config.
Explanation at https://www.confluent.io/blog/kafka-listeners-explained/
TIL: A Kafka client's initial options include broker host/port details.
That is used for the initial (seed) connection to get broker metadata.
The metadata includes connection details, which can depend the topic(s).
0 commit comments