Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1015 Bytes

README.md

File metadata and controls

51 lines (35 loc) · 1015 Bytes

httpmq npm CircleCI NPM npm

RabbitMQ via HTTP API in Node.js

Install

npm install httpmq --save
# yarn add httpmq

Create a client

const {createClient} = require('httpmq')

const uri = 'http://localhost:15672/vhost?prefixQueue=prefix'
const client = createClient(uri)

Functions

1. Connections

// Get list connections
const connections = await client.listConnections()

2. Queues

// Get list queues
const queues = await client.listQueues()

// Get sepecific queue
const queue = await client.getQueue('queueName')

// Send to queue
await client.sendToQueue('queueName', body, {ttl: 7200_000})

License

MIT