This is the backend for the order-management project.
## Installation
Clone this project and CD into the directory and open it up with your favorite editor or IDE of choice.
You are also going to want to install Apache Kafka and get the server running on your local machine before running the backend application.
To install the Apache Kafka , go to this [link](https://www.apache.org/dyn/closer.cgi?path=/kafka/2.8.0/kafka_2.13-2.8.0.tgz) and download the tar.
You then want to unzip the tar file and put it in whatever directory is easiest for you to access.
## Usage
You want to now open up two separate terminals for running the zookeeper and the kafka server. Once you have two terminals opened up CD into the apache kafka directory in both terminals and run these commands in order:
Once you have both of these commands running you can now go into your IDE of choice or editor, and run the backend java application. Once the application is running you want to send either a curl request with a query param of "message=somethinghere" or use a service like postman and have a query params in there. The route you are going to want to hit is http://localhost:8080/kafka/publish.
Once you hit the route mentioned above with the query param, go back to your IDE and you should see producer sending a message and consumer consuming that message.