0.2.19 • Published 3 years ago
amqp-streaming-js v0.2.19
AMQP to JavaScript asynchronous object streams
Usage
yarn add amqp-streaming-jsSimple 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 testThe 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