This repository is used to assume the way RabbitMQ and Node.js could work together, around some AMQP protocol, without forgetting the JWT (JSON Web Token) authentication.
Hey, wanna know more? It's running with Docker!
Open your terminal and clone the project stack from Github
$ git clone https://github.com/gigouni/node-amqp
Run the docker-compose.yml to docker-ise the bundles into a single 'virtual network'
$ cd node-amqp/bundles/ && sudo docker-compose up
Go check the bundles/README.md for more information
SENDER
- POST /api/send/:data?token=TOKEN_KEY --> Send a message through the queue
RECEIVER MAIL
- GET /api/receive?token=TOKEN_KEY --> Receive a message form the queue, for 'MAIL' target
RECEIVER SMS
- GET /api/receive?token=TOKEN_KEY --> Receive a message form the queue, for 'SMS' target
Why not? No seriously, there are some reasons. The first one is the popularity of the RabbitMQ MOM. The most the users, the more the potential help for future issues. The second one is the documentation much better w/ RabbitMQ than ActiveMQ.
"Well, and technically ?"
The POC is here to prove that RabbitMQ could easily, quickly be used as a MOM to handle the sending and receiving of messages. It's not so heavy content and benchmarks (here and here) are OK to tell that RabbitMQ is more efficient w/ light content. The AMQP ("Advanced Message Queuing Protocol") has been chosen due to the reliability of its queues and to be an example for most of the RabbitMQ/Node.js interested people (MQTT is better for IoT, STOMP for text-based messages and WS should be replaced by STOMP since the Javascript correctly handles JSON and text content).
- Implement an example of session ID authentication
- Improve the stack with a better architecture and documentation (maybe)
Not implemented yet. Let's see it later
Docker is part of the solution. Check this.
- Node.js - The JS interpreter
- RabbitMQ - The MOM (message broker)
- JSON Web Token - Used to secure the access to the back-end
- Docker - The application container
No contributions necessary.
- Nicolas GIGOU - Initial work - Gigouni
No other contributors
This project is licensed under the MIT License - see the LICENSE.md file for details
- Implement a Node.js server
- Follow ES6 conventions
- Assume the role and the features of a MOM ("Message-Oriented Middleware")
- Bind a Node.js server with a MOM like RabbitMQ
- Control access through JWT
- Dockerize the application w/ Dockerfile or docker-compose.yml