@joinf/rabbitmq

1.0.3 • Public • Published

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");

Package Sidebar

Install

npm i @joinf/rabbitmq

Weekly Downloads

4

Version

1.0.3

License

none

Unpacked Size

4.83 kB

Total Files

7

Last publish

Collaborators

  • joinf