resolve-bus-rabbitmq
This package is a resolve-es
adapter for emitting events using RabbitMQ (based on the amqplib package). It requires RabbitMQ to be installed on your machine.
Available Parameters
You can pass the following arguments when initializing an adapter:
url
(required) - the RabbitMQ URL.exchange
- an exchange name. The default is exchange
. Learn morequeueName
- a queue name. The default is ''
. Learn moreexchangeType
- the exchange type. The default is fanout
. Learn moremessageTtl
- a message's lifetime. The default is 2000
.maxLength
- the maximum number of messages the queue holds. The default is 10000
.
Usage
import createAdapter from 'resolve-bus-rabbitmq'
const adapter = createAdapter({
url: 'amqp://localhost'
})