GithubHelp home page GithubHelp logo

rabbitmq-mqtt-cluster's Introduction

rabbitMQ MQTT Cluster

This docker file is built based on the official RabbitMQ image file, with MQTT turned on and environment variables for the cluster added.

docker hub: https://hub.docker.com/repository/docker/davincievans/rabbitmq-mqtt-cluster/general

Quick Start

This docker image is primarily used for cluster deployments, so we recommend that you use docker compose to start your application.

We have added three new environment variables to the original official ones:

  • CLUSTER_WITH: indicates the node you need to connect to.

  • RAM_NODE: whether to enable RAM mode, otherwise it defaults to disk.

  • MIRROR_QUEUE: whether to enable mirror clustering, if so, it will synchronise all messages from the current node to other nodes.

By default 3 nodes are started up this way:

version: '3.7'
services:
  rabbit1:
    image: "davincievans:rabbitmq-mqtt-cluster-3.12"
    hostname: rabbit1
    environment:
      RABBITMQ_ERLANG_COOKIE: "unique_cookie"
      RABBITMQ_DEFAULT_USER: "admin"
      RABBITMQ_DEFAULT_PASS: "password"
      MIRROR_QUEUE: true
    networks:
      - rabbitmq-network

  rabbit2:
    image: "davincievans:rabbitmq-mqtt-cluster-3.12"
    hostname: rabbit2
    environment:
      RABBITMQ_ERLANG_COOKIE: "unique_cookie"
      RABBITMQ_DEFAULT_USER: "admin"
      RABBITMQ_DEFAULT_PASS: "password"
      CLUSTER_WITH: rabbit1
      RAM_NODE: true
      MIRROR_QUEUE: true
    networks:
      - rabbitmq-network
    depends_on:
      - rabbit1

  rabbit3:
    image: "davincievans:rabbitmq-mqtt-cluster-3.12"
    hostname: rabbit3
    environment:
      RABBITMQ_ERLANG_COOKIE: "unique_cookie"
      RABBITMQ_DEFAULT_USER: "admin"
      RABBITMQ_DEFAULT_PASS: "password"
      CLUSTER_WITH: rabbit1
      MIRROR_QUEUE: true
    networks:
      - rabbitmq-network
    depends_on:
      - rabbit1

networks:
  rabbitmq-network:
    driver: bridge

You can also use it with haproxy by referring to the docker-compose.yml file above

rabbitmq-mqtt-cluster's People

Contributors

davincievans avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

cmoniz-ocean

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.