rabbit-message-queue

1.1.0 • Public • Published

Rabbit Message Queue

An implementation of abstract-message-queue for a RabbitMQ backend.

In short, creates an async iterator that acts as a worker queue.

Uses the for await of pattern for resource cleanup.

To use:

import RabbitMessageQueue from 'rabbit-message-queue';

for await(const queue of RabbitMessageQueue.connect('amqp://://localhost:5672', 'my_queue')) {
	await myApplicationThatUsesAbstractMessageQueue(queue);
}

For more details on how to use the queue instance, see the abstract-message-queue README.

Dependencies

  • abstract-message-queue: ^1.0.0
  • rabbit.js: ^0.4.4

rabbit-message-queue

Rabbit Message Queue

See: default

rabbit-message-queue.default

Kind: static property of rabbit-message-queue

rabbit-message-queue.connect(url, table)

Connect to rabbit and yield an instance of the message queue

Kind: static method of rabbit-message-queue

Param Type Description
url string The URL of the rabbit instance to connect to
table string The queue name to connect to

rabbit-message-queue.sender(url, table)

Connect to rabbit and yield a function for adding a message to the queue

Kind: static method of rabbit-message-queue

Param Type Description
url string The URL of the rabbit instance to connect to
table string The queue name to connect to

Package Sidebar

Install

npm i rabbit-message-queue

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

9.85 kB

Total Files

6

Last publish

Collaborators

  • paulkiddle