Apache Kafka consumer

Hi, I’m starting with Kafka. On my computer a create Kafka server. On my computer is running integrator, which is streaming (periodicly) data to Kafka. If I create consumer in cmd, I can see data. I created this according to the instructions: Apache Kafka

But… A need consume data from kafka in Python code, which is running on other computer. In code I’m using ‘localhost:9092’ (this failed…). So, my problem is: How I can create Kafka consumer, which can be used on any computer.

Thank you

How are the two computers connected? Are they on the same local network? Is there any firewall between them?

In essence you need to know the host or IP on which your Kafka broker (server) can be reached from the other machine that’s running the Python code, and then configure your advertised.listeners correctly.

This guide will help you: https://www.confluent.io/blog/kafka-client-cannot-connect-to-broker-on-aws-on-docker-etc/