version: '2'
services:
  kafka-broker:
    container_name: kafka-broker
    image: confluentinc/cp-kafka:5.3.1
    ports:
      - "9092:9092"
    environment:
      - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
      - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
      - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
      - KAFKA_MESSAGE_MAX_BYTES=2097152
    depends_on:
      - zookeeper

  zookeeper:
    container_name: zookeeper
    image: confluentinc/cp-zookeeper:5.3.1
    expose:
      - "2181"
    environment:
      - ZOOKEEPER_CLIENT_PORT=2181
    

  
    