simple-amqp-server
v0.0.7
Published
simple amqp server for testing purpose
Maintainers
Readme
Simple amqp server
Goals
The goals of the library is to provide a simple way to spawn up an amqp server for automated tests.
Do not try to use this server as a real message broker as it the protocol may never be fully
implemented.
Installation
$ npm install simple-amqp-serverUsage
const sas = require('simple-amqp-server')
async function main() {
const server = new sas.Server({
port: 5672,
onPublish
})
await server.start()
console.log('server started')
async function onPublish(message) {
console.log(`received payload: ${message.payload.toString()}`)
await server.stop()
}
}
main()TODO
- [ ] Write more tests
- [ ] Add Api to push event from server to queues
- [ ] Implement publish confirm
