- Cloud Native programming with Golang
- Mina Andrawos Martin Helmich
- 338字
- 2021-07-02 20:03:47
RabbitMQ quickstart with Docker
Before building our publish/subscribe architecture, you will need to set up a running RabbitMQ message broker in your development environment. The easiest way to get started with RabbitMQ is by using the official Docker images.
For this example, we will assume that you have a working Docker installation on your local machine. Take a look at the official installation instructions to learn how you can install Docker on your operating system at: https://docs.docker.com/engine/installation.
You can start a new RabbitMQ broker using the following command on your command line:
$ docker run --detach \ --name rabbitmq \ -p 5672:5672 \ -p 15672:15672 \ rabbitmq:3-management
The preceding command will create a new container named rabbitmq on your machine. For this, Docker will use the rabbitmq:3-management image. This image contains the latest release of RabbitMQ 3 (at the time of writing, 3.6.6) and the management UI. The -p 5672:5672 flag will instruct Docker to map the TCP port 5672 (which is the IANA-assigned port number for AMQP) to your localhost address. The -p 15672:15672 flag will do the same for the management user interface.
After starting the container, you will be able to open an AMQP connection to amqp://localhost:5672 and open the management UI in your browser at http://localhost:15672.
When you are using Docker on Windows, you will need to substitute localhost with the IP address of your local Docker virtual machine. You can determine this IP address using the following command on the command line: $ docker-machine ip default.
Regardless whether you are using docker-machine or a local Docker installation, the RabbitMQ user interface should look very much like it does in the following screenshot:

RabbitMQ's management user interface
Open the management interface in your browser (http://localhost:15672 or your docker-machine IP address). The RabbitMQ image ships a default guest user whose password is also guest. When running RabbitMQ in production, this is, of course, the first thing that you should change. For development purposes, it will do fine.
- LED封裝與檢測技術(shù)
- 西門子工業(yè)網(wǎng)絡(luò)通信技術(shù)詳解
- Android板級支持與硬件相關(guān)子系統(tǒng)
- RFID 重大工程與國家物聯(lián)網(wǎng)(第3版)
- 印制電路組件裝焊工藝與技術(shù)
- 光纜與光設(shè)備維護(hù)
- TD-LTE原理與網(wǎng)絡(luò)規(guī)劃設(shè)計(“十二五”國家重點圖書出版規(guī)劃項目)
- 路由與交換(第二版)
- 現(xiàn)代通信原理與技術(shù)
- 手繪圖說電子電路圖
- Premiere Pro CC2018中文版基礎(chǔ)培訓(xùn)教程
- Wireshark網(wǎng)絡(luò)分析的藝術(shù)
- 軌道交通信號基礎(chǔ)設(shè)備應(yīng)用與維護(hù)
- 從1G到5G:移動通信如何改變世界
- 傳感器與檢測技術(shù)(第3版)