Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

A MQTT-alike event broker to enable losely coupled microservices being synchronized

License

Notifications You must be signed in to change notification settings

technicalguru/docker-eventbroker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventBroker

Overview

EventBroker is a MQTT-alike message broker that enables losely coupled microservices. The broker connects to a JDBC data source in order to configure the messaging rules.

Features

  • Clients can publish MQTT-like topics and subscribe to them using wildcards
  • API protection via Authorization Bearer token (see Issues below)
  • Provides cron-like topics in order to trigger subscribers regulary
  • Fail-safe and threaded topic distribution (subscribers can fail or not be available at all)

Project Status

EventBroker is stable and used in a few production environments.

License

EventBroker is licensed under GNU LGPL 3.0.

Download

EventBroker is available as a Docker image at DockerHub and in Maven repositories. The current version is v1.0.

<dependency>
  <groupId>eu.ralph-schuster</groupId>
  <artifactId>eventbroker</artifactId>
  <version>1.0.0</version>
</dependency>

Running the Docker Image

Issue the following command to run EventBroker in your Docker environment:

docker run -ti technicalguru/eventbroker  

This will run EventBroker on port 80 with a HSQLDB as storage backend. Several features can be configured:

  • Set environment variable EB_DB_CONFIG to use your own database backend. See examples at src/main/resources. Do not forget to mount your config XML file into the docker container.
  • Set the listening port by running the command /var/www/jersey/run.sh <port>.
  • Set the specific listening interface by running the command /var/www/jersey/run.sh <port> <ip-address>
  • Set environment variable EB_SECURE_TOKEN to a specific string in order to protect your API by a Bearer token.

Documentation

More documentation is available here:

Issues

  • MQTT feature "qos", "retain" and "dup" are not processed - just forwarded.
  • API authorization imitates OAuth token by checking the token against a fix environment variable. This token can not be limited to certain topics, clients or privileges (see EB-4).
  • Shutdown can take up to 60 secs.
  • Only HTTP is supported.
  • Cron-feature not yet documented (see EB-3). Refer to the source code meanwhile.
  • The database structure is not yet documented (see EB-5). Please refer to Hibernate configuration and Subscriber source code meanwhile.

Contribution

Report a bug or request an enhancement at the JIRA Issue Tracker.