I am using the docker compose to run my microservice application. I am using kafka message broker to communicate between two microservices.
The producer is producing the message to the topic (showing in the logs) but the consumer is not picking it up. Locally working fine
services:
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper-container
ports:
- "2181:2181"
networks:
- my-movie-network
kafka:
image: wurstmeister/kafka
container_name: kafka-container
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://config-server:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_LISTENERS: INSIDE://0.0.0.0:9092,OUTSIDE://0.0.0.0:9093
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "baeldung:1:1"
networks:
- my-movie-network
authentication-service:
image: tejajagadeep/movie-app-authentication-service
container_name: authentication-container
build:
context: authentication-service
dockerfile: Dockerfile
environment:
- spring.kafka.consumer.bootstrap-servers=kafka:9092
ports:
- "8090:8090"
networks:
- my-movie-network
links:
- kafka
userprofile-service:
image: tejajagadeep/movie-app-userprofile-service
container_name: userprofile-container
build:
context: userprofile-service
dockerfile: Dockerfile
environment:
- spring.kafka.producer.bootstrap-servers=kafka:9092
ports:
- "8092:8092"
networks:
- my-movie-network
links:
- kafka
I want the consumer to pick up the topic my producer is working fine but the consumer has some issue in kafka locally everything is working great
Kollimarla Jagadeep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.