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.
- 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)
EventBroker is stable and used in a few production environments.
EventBroker is licensed under GNU LGPL 3.0.
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>
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.
More documentation is available here:
- 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.
Report a bug or request an enhancement at the JIRA Issue Tracker.