Streetfleet MQ
Usage
- Duplicate
.env.default
into an.env
file and configure it with the correct database access data and queue name. - Start MongoDB and Redis processes in your machine.
- Run the server with
yarn start
(afteryarn install
) to accept new messages. - Run
node runner.js
to start a new consumer for the message queue. (You can create as many as you want). - Make a post request to add a new message:
POST / HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 745bcee3-8c08-ae5c-8b25-d4e4d8bd03f6
{
"mac_address" : "44-14-22-01-23-45",
"time": 1521810000000,
"latitude": 45.2656452,
"longitude": 2.35653
}