0

I tried out an example program using PHP and RabbitMQ and it worked well

All the 3 (Client, MQ Server and Server) are running on the same machine

Client.php --->  Rabbit MQ Server (exe)  --->  Server.php

Now, I dockerized Server.php and I want to use the same setup.

Client.php --->  Rabbit MQ Server (exe)  --->  Dockerized Server.php

Client.php will send messages to RabbitMQ Server. However, I am not sure how to make docker container to receive messages from Rabbit MQ which runs on Windows host

There are many examples which uses RabbitMQ + Application containers to do the task.

Just wanted to know whether the scenario (Docker container using Windows host program) mentioned above can be accomplished.

Sathish Kumar
  • 2,150
  • 10
  • 29
  • 51
  • Use the special host name `host.docker.internal` to connect to the RabbitMQ broker (on Windows or MacOS). – David Maze May 28 '21 at 15:14
  • @DavidMaze Sorry, where to use ? Like this $connection = new AMQPStreamConnection(host.docker.internal, 5672, 'guest', 'guest'); – Sathish Kumar May 28 '21 at 15:18

0 Answers0