Coder Social home page Coder Social logo

toktaktk / rabbitmq-mqtt-ws-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mpolinowski/rabbitmq-mqtt-ws-docker

0.0 0.0 0.0 67 KB

RabbitMQ Docker-Compose for MQTT, WS and AMQP

Home Page: https://mpolinowski.github.io/docs/IoT-and-Machine-Learning/MQTT/2022-03-30--mqtt-with-rabbit-mq/2022-03-30

Dockerfile 100.00%

rabbitmq-mqtt-ws-docker's Introduction

RabbitMQ Docker

Run a Rabbit Message Que using Docker and Docker-Compose. Install all necessary plugins to use RabbitMQ as your MQTT Broker and connect to with your client software either using the MQTT or AMQP protocol over a websocket connection.

Run

Run the container with the following command to be able to see the container log for debugging. The container will expose

docker-compose up

Starting rabbitmq ... done
Attaching to rabbitmq
rabbitmq    | Enabling plugins on node rabbit@1a7c322456fc:
rabbitmq    | rabbitmq_mqtt
rabbitmq    | rabbitmq_web_mqtt
rabbitmq    | rabbitmq_amqp1_0
rabbitmq    | The following plugins have been configured:
rabbitmq    |   rabbitmq_amqp1_0
rabbitmq    |   rabbitmq_management
rabbitmq    |   rabbitmq_management_agent
rabbitmq    |   rabbitmq_mqtt
rabbitmq    |   rabbitmq_prometheus
rabbitmq    |   rabbitmq_web_dispatch
rabbitmq    |   rabbitmq_web_mqtt
rabbitmq    |   ##  ##      RabbitMQ 3.9.14
rabbitmq    |   ##  ##
rabbitmq    |   ##########  Copyright (c) 2007-2022 VMware, Inc. or its affiliates.
rabbitmq    |   ######  ##
rabbitmq    |   ##########  Licensed under the MPL 2.0. Website: https://rabbitmq.com
rabbitmq    | 
rabbitmq    |   Erlang:      24.3.3 [jit]
rabbitmq    |   TLS Library: OpenSSL - OpenSSL 1.1.1n  15 Mar 2022
rabbitmq    | 
rabbitmq    |   Doc guides:  https://rabbitmq.com/documentation.html
rabbitmq    |   Support:     https://rabbitmq.com/contact.html
rabbitmq    |   Tutorials:   https://rabbitmq.com/getstarted.html
rabbitmq    |   Monitoring:  https://rabbitmq.com/monitoring.html
rabbitmq    | 
rabbitmq    |   Logs: /var/log/rabbitmq/rabbit@1a7c322456fc_upgrade.log
rabbitmq    |         <stdout>
rabbitmq    | 
rabbitmq    |   Config file(s): /etc/rabbitmq/advanced.config
rabbitmq    |                   /etc/rabbitmq/rabbitmq.conf
rabbitmq    |                   /etc/rabbitmq/conf.d/10-defaults.conf
docker exec -ti rabbitmq rabbitmq-diagnostics status

Plugins

Enabled plugin file: /etc/rabbitmq/enabled_plugins
Enabled plugins:

 * rabbitmq_prometheus
 * prometheus
 * rabbitmq_amqp1_0
 * accept
 * rabbitmq_web_mqtt
 * rabbitmq_mqtt
 * rabbitmq_management
 * amqp_client
 * rabbitmq_web_dispatch
 * cowboy
 * cowlib
 * rabbitmq_management_agent

Config files

 * /etc/rabbitmq/advanced.config
 * /etc/rabbitmq/rabbitmq.conf
 * /etc/rabbitmq/conf.d/10-defaults.conf

Listeners

Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 1883, protocol: mqtt, purpose: MQTT
Interface: [::], port: 15675, protocol: http/web-mqtt, purpose: MQTT over WebSockets
Interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0

Connections

Check the ./docker-compose.yml file for the published ports:

Service Exposed Port
AMQP 5672
Management 8080
MQTT 1883
WebSocket 1885

You can access the webinterface on port 8080 and connect to the MQTT Broker on port 1883 - both use default login specified in ./config/login.env:

RabbitMQ Docker

MQTT over WebSocket can be accessed at ws://server-address:1885/ws.

Once everything is working use the -d flag to detached the container from your console:

docker-compose up -d

rabbitmq-mqtt-ws-docker's People

Contributors

mpolinowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.