Skip to content
/ hermes Public

An easy to user Docker container that starts several MQTT Mosca brokers, handling massive connections simultaneously.

License

Notifications You must be signed in to change notification settings

Gctucci/hermes

Repository files navigation

Hermes - Fully Scalable MQTT Broker

An easy to user Docker container that starts several MQTT Mosca brokers, handling massive connections simultaneously.

Getting Started

These instructions will get you a copy of the project up and running.

Prerequisites and Installation

  1. You must have an active account on Auth0
  2. Once you account is activated, you must create a Machine-to-Machine (M2M) API in Auth0. See this very useful tutorial for more details.
  3. Copy the env.example file and change its contents to match both Auth0 API configuration and deployment mode
  4. Build and run the Docker compose command
cd <your_project_folder>
docker-compose build
docker-compose up

The server should be available for connection at port 1883

Happy messaging! =)

Notes and Tips

  • By default, the docker compose file is set to create 5 Mosca replicas. If you are handling a huge number of connections simultaneously, you might wanna increase this number.
  • In order to authenticate any potential listeners/subscriber, the server uses JWT authentication.
  • By default, subscribers after authentication can only send/listen messages to topics which contains the client_id in their name. So in order to publish messages, you need to keep tabs on the subscription client_id.

Built With

  • NodeJS - Javascript runtime used for the code
  • HAProxy - Lightweight TCP Load balancer
  • Redis - Default message persistence layer/in-memory database
  • Mosca - Incredible MQTT Node.js broker
  • Auth0 - JWT Device authentication service

Contributing

For instructions on how to contribute, please contact the the author directly.

Authors

  • Gabriel Natucci - Initial work - Digseed

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Based on the library to connect Auth0 and the Mosca Server, provided by @eugenioip

About

An easy to user Docker container that starts several MQTT Mosca brokers, handling massive connections simultaneously.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published