https://github.com/tutv/httpmq
RabbitMQ via HTTP in Node.js
https://github.com/tutv/httpmq
amqp nodejs npm npm-package rabbitmq
Last synced: about 1 month ago
JSON representation
RabbitMQ via HTTP in Node.js
- Host: GitHub
- URL: https://github.com/tutv/httpmq
- Owner: tutv
- Created: 2022-04-04T09:10:18.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-12T08:15:36.000Z (about 4 years ago)
- Last Synced: 2025-08-20T08:15:54.744Z (10 months ago)
- Topics: amqp, nodejs, npm, npm-package, rabbitmq
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/httpmq
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
httpmq    
-------
RabbitMQ
via [HTTP API](https://rawcdn.githack.com/rabbitmq/rabbitmq-server/v3.9.14/deps/rabbitmq_management/priv/www/api/index.html)
in Node.js
Install
-------
```bash
npm install httpmq --save
# yarn add httpmq
```
### Create a client
```javascript
const {createClient} = require('httpmq')
const uri = 'http://localhost:15672/vhost?prefixQueue=prefix'
const client = createClient(uri)
```
### Functions
#### 1. Connections
```javascript
// Get list connections
const connections = await client.listConnections()
```
#### 2. Queues
```javascript
// 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