This is a tool for creating and handling tasks using RabbitMQ message broker.
- Node.js
- RabbitMQ
- Erlang
- Clone the repository:
git clone https://github.com/ffoDevilSusiJ/RabbitMQTZ.git
- Install dependencies:
npm install
- Start the RabbitMQ server.
- Start the services:
npm run dev
- If the firewall needs to allow access to the network, you will need to restart the services
- Send a task to the service using the
/calc?a={value}&b={value}
endpoint.
/calc
: Sends the task and returns the result.
{
"a": number,
"b": number,
"id": string,
"result": number
}
The service can be configured using the following environment variables:
RABBITMQ_HOST
: The hostname of the RabbitMQ server. Default islocalhost
.RABBITMQ_PORT
: The port number of the RabbitMQ server. Default is5672
.RABBITMQ_USER
: The username for authenticating with the RabbitMQ server. Default isguest
.RABBITMQ_PASS
: The password for authenticating with the RabbitMQ server. Default isguest
.
You can modify the configuration settings in config/default.json
, such as the server.port. Default is 3001.
This project is licensed under the MIT License - see the LICENSE file for details.