services:
  rabbit:                                       
    image: rabbitmq:3.10.7-management             
    restart: always     
    ports:  
      - 5672:5672                               
      - 8081:15672                              
    environment:
      RABBITMQ_DEFAULT_USER: admin 
      RABBITMQ_DEFAULT_PASS: admin
  
  publisher:
    build: ./Publisher/
    restart: always
    depends_on:
      - rabbit
    environment:
      RABBIT_HOST: rabbit
      RABBIT_USERNAME: admin
      RABBIT_PASSWORD: admin
      RABBIT_EXCHANGE: 'ReportIn'

  concumer1:
    build: ./ConsumerSimple/
    restart: always
    depends_on:
      - rabbit
      - publisher
    environment:
      RABBIT_HOST: rabbit
      RABBIT_USERNAME: admin
      RABBIT_PASSWORD: admin
      RABBIT_EXCHANGE: 'ReportIn'
      RABBIT_QUEUE: 'First'

  concumer2:
    build: ./ConsumerSimple/
    restart: always
    depends_on:
      - rabbit
      - publisher
    environment:
      RABBIT_HOST: rabbit
      RABBIT_USERNAME: admin
      RABBIT_PASSWORD: admin
      RABBIT_EXCHANGE: 'ReportIn'
      RABBIT_QUEUE: 'Second'
  # concumer2:
  #   build: ./ConsumerDelay/
  #   restart: always
  #   depends_on:
  #     - rabbit
  #     - publisher
  #   environment:
  #     RABBIT_HOST: rabbit
  #     RABBIT_USERNAME: admin
  #     RABBIT_PASSWORD: admin
  #     RABBIT_EXCHANGE: 'ReportIn'
  #     RABBIT_QUEUE: 'Second'