amqp-streaming-js
v0.2.19
Published
AMQP to Javascript Asynchronous Streams
Downloads
5
Readme
AMQP to JavaScript asynchronous object streams
Usage
yarn add amqp-streaming-js
Simple usage example:
const {amqpConsume} = require('amqp-streaming-js')
const {
output, errors,
} = await amqpConsume({
messageBrokerUrl,
streamName,
beforeAck: {pass your Promise here},
prefetch: 40,
parallel: 5,
operationWindowMs: 200,
})
// output and errors are exstream streams - can pipe to any other data or object stream:
output
.pipe(process.stdout)
errors
.pipe(process.stderr)
Development
Start a Rabbit Broker first: yarn rabbit
. Then:
yarn test
The Github actions expects the Secret MESSAGE_BROKER_URL
to be set.
The MESSAGE_BROKER_URL
is really a connection string and should include username and password.
Publishing artifact.
Here is where things get crazy. Between npm, package.json, yarn and GitHub organizations there's so much confusion as there can possibly be.
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
Tech docs
- RabbitMQ
- Streams: https://www.rabbitmq.com/streams.html
- Tuning: https://www.rabbitmq.com/runtime.html