NoName
NoName

Reputation: 1759

Docker + Kafka: Is it possible to run a Consumer on Docker which reads from a Kafka topic outside Docker?

we're trying to run a Consumer on Docker container and have Kafka, ZK and Schema Registry run outside Docker. Most of the examples I see for running Kafka inside Docker and making sure it is accessible from outside, are there any examples of the other way round i.e., making Kafka accessible inside Docker? Any leads/examples will help. Thank you!

Upvotes: 0

Views: 38

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191844

A consumer inside a container should work the same as a consumer just on your host.

The broker's advertised.listeners should be the broker's external IP. When any client connects to this inside a container, it will be routed though the host's network interface.

Upvotes: 1

Related Questions