Consume Operations is a simple message receiving system.
The app consumes messages which are sent from Message Send Operations project and writes logs to stdout.
EndPoint.java class has written to make channel and connection of message queue easily reachable.
Properties file externalizes the configuration and store the key-value pairs of message queue such as IP address, username, password, etc. It can be accessable by getProperty() method from PropertiesReader.java class.
In the project, there is a Worker.java class which receives and writes messages to stdout. Also it is implemented from Runnable interface to work with threads.
There are two workers created in the main class. When the app starts, two threads which contains these workers start too. So the app may consume two packages at one time.
- Java version 8 or higher.
- RabbitMQ 3.8.x
- Apache Maven 3.6.3
- Download the repository files (project) from the download section or clone this project by typing in the bash the following command:
git clone https://github.com/mkalyoncu/ConsumeOperations.git
- Import it in Intellij IDEA.
- Find 'rabbitmq.properties' file under the resources directory and modify it with your information
- Make an executable jar from the project with command below
mvn install
cd target
java -jar ConsumeOperations-jar-with-dependencies.jar