I’m leaving the solution here for anyone who encounters the same issue!
kafka/server.properties
listeners=INTERNAL://0.0.0.0:9092,EXTERNAL://0.0.0.0:9093
advertised.listeners=INTERNAL://kafka:9092,EXTERNAL://localhost:9093
listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
docker-compose.yml
service:
kafka:
build:
context: ./kafka
dockerfile: Dockerfile
image: simple-sns-kafka:latest
container_name: 'simple-sns-kafka'
ports:
- '9092:9092'
- '9093:9093' # added code
- '8083:8083' # Kafka Connect REST API Port
kafka:
consumer:
bootstrap-servers: localhost:9093
producer:
bootstrap-servers: localhost:9093
This is my first time using Stack Overflow. If there’s any better way for me to express my gratitude, please let me know!!