This repository provides the official Java client library as well as examples of how applications can interact with BlazingMQ. BlazingMQ is an open source message queue system with focus on efficiency, reliability and a rich feature set. Please see the BlazingMQ repo and documentation for more details about BlazingMQ.
This Java client is fully supported by the BlazingMQ team and we provide feature and/or API parity with the BlazingMQ C++ client library.
This repository contains two modules. The built packages for these modules are available in Maven Central:
- bmq-sdk: contains BlazingMQ Java client library code
- bmq-examples: contains sample producer and consumer clients
Execute from repo root:
$ mvn clean installAbove command will compile and install both modules -- bmq-sdk as well as
bmq-examples. It will also run tests and carry out static analysis. If it
is desired to skip running any tests and static analysis while creating the
JARs (because those steps were executed already), one can execute:
$ mvn clean -Dmaven.test.skip=true -Dspotbugs.skip=true installPrerequisites:
- BlazingMQ backend is built and is available.
bmq-sdkJAR is installed locally.
Java SDK producers/consumers can be tested with the local BlazingMQ broker. For Linux build, first start the local broker:
cd $BLAZINGMQ_DIR/build/Linux/src/applications/bmqbrkr
./runSecondly, start sample producer, that will connect to the local broker, open a queue, post messages and exits:
$ cd bmq-examples
$ mvn clean compile
$ mvn exec:java -Dexec.mainClass="com.bloomberg.bmq.examples.SimpleProducer"Detailed instructions on how to build BlazingMQ backend (BlazingMQ message brokers, etc) can be found here.
The SDK requires JDK 17 or newer to build and run. The code is compiled
with release=17.
By default, the JDK defined in JAVA_HOME is used. To use a specific JDK,
override JAVA_HOME env variable. For instance:
# clean output and compile the code using a specific JDK install
$ JAVA_HOME=${PATH_TO_JDK} mvn clean compile
...
[INFO] BUILD SUCCESS
...-
All unit tests
$ mvn -q -Dspotbugs.skip=true -Dspotless.check.skip=true test // '-q' for quiet mode
-
A specific unit test class, e.g.
OpenQueueTest$ mvn -q -Dspotbugs.skip=true -Dspotless.check.skip=true -Dtest=OpenQueueTest test -
A specific unit test method of a class, e.g.
OpenQueueTest.testReset$ mvn -q -Dspotbugs.skip=true -Dspotless.check.skip=true -Dtest=OpenQueueTest#testReset test
We welcome your contributions to help us improve and extend this project!
We welcome issue reports here; be sure to choose the proper issue template for your issue, so that we can be sure you're providing us with the necessary information.
Before sending a Pull Request, please make sure you have read our Contribution Guidelines.
The BlazingMQ Java SDK is Apache 2.0 licensed, as found in the LICENSE file.
This project has adopted a Code of Conduct. If you have any concerns about the Code, or behavior which you have experienced in the project, please contact us at opensource@bloomberg.net.
If you believe you have identified a security vulnerability in this project, please email the project team at opensource@bloomberg.net, detailing the suspected issue and any methods you've found to reproduce it.
Please do NOT open an issue in the GitHub repository, as we'd prefer to keep vulnerability reports private until we've had an opportunity to review and address them.