KafkaConsumer hangs on poll KafkaConsumer hangs on poll docker docker

KafkaConsumer hangs on poll


It turns out that I had the same problem as is common when kafka is in the container. The advertised.listeners needs to be set to the hostname/IP of the host machine, not the default.