RabbitMQ
Iniciando Comunicação
const rabbitMQ = require("./RabbitMQ");
await rabbitMQ.init("amqp://localhost");
Criando consumidores
rabbitMQ.consumer.listen("my-queue-name", ({ message, data, channel }) => {
// Acept message
channel.ack(message);
});
Publicando mensagens
rabbitMQ.producer.publish("my-exchange-name", "my-routing-key", "my message");