0.1.9 • Published 4 years ago

@peregrine/mq-lib v0.1.9

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Node.js linter & tests Node.js deployment Quality Gate Status license npm node version types

MQ-lib

Very simple and minimal amqplib wrapper.

Methods - MqService class

MethodDescription
static connectOnce(url: string): Promise<MqService>Creates a connection to the RabbitMQ instance at the specified url.
static connect(url: string, maxNumOfTries = 10): Promise<MqService>Creates a connection to the RabbitMQ instance at the specified url. Tries to connect at least 10 times (unless otherwise specified).
addListener(queueName: string, listener: (data: string) => Promise<boolean>): voidAdds a listener to the queue with name queueName. When the listener returns a true, an ACK is sent.
sendMessage(queueName: string, data: Json)Sends a message to the queue with name queueName. The message can be a string or JSON.
close(): Promise<void>Closes the connection
0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.6

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago