intermediateSpring Boot Integration: Dockerizing, PostgreSQL, Redis, Kafka & Microservices

Kafka consumers in one service never receive messages produced by another service

Logs show the producer service successfully connects to Kafka and reports messages sent; the consumer service's logs show it joined the consumer group, but no messages ever arrive. Diagnose. Expected reasoning: this is the classic advertised-listener mismatch — check KAFKA_ADVERTISED_LISTENERS on the broker; if it's set to localhost or an unreachable address, clients can complete the initial bootstrap/metadata handshake (talking to the configured bootstrap-servers address) but then fail silently or with connection timeouts when redirected to the (wrong) advertised address for actual produce/co

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Why is tagging images with 'latest' discouraged in CI/CD pipelines?← Back to all Docker questions