Registry / devops / http-rabbitmq-manager

http-rabbitmq-manager

JSON →
library0.0.4jsnpmunverified

This library, `http-rabbitmq-manager`, is a Node.js client designed to interact with the RabbitMQ HTTP API. As of version 0.0.4, with its last commit over seven years ago, the package is considered abandoned and no longer actively maintained. It provides a programmatic interface for management and monitoring tasks such as retrieving cluster overview, listing nodes, connections, channels, consumers, and exchanges, and setting cluster definitions. A significant limitation is its official support for only RabbitMQ 3.x, while the current stable RabbitMQ version is 4.2.5. This means it may not be compatible with newer RabbitMQ installations or features. The library's functionality relies heavily on the RabbitMQ Management UI plugin being installed and enabled on the RabbitMQ server. The API uses traditional Node.js callback patterns for asynchronous operations, which differs from modern Promise-based or `async/await` paradigms. For current RabbitMQ monitoring, official documentation now recommends tools like Prometheus and Grafana over direct HTTP API scraping for long-term data collection.

npm install http-rabbitmq-manager
INSTALL
IMPORT
SIG · HTTP-RABBITMQ-MANA
H
http-rabbitmq-manager
devopsjavascriptv0.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

client
const managerClient = require('http-rabbitmq-manager').client({ /* config */ });
const managerClient = require('http-rabbitmq-manager')({ /* config */ });
The main module export is an object; the `client` factory function is a property on it. This package uses CommonJS `require` syntax.

Instantiate the client and demonstrate fetching basic RabbitMQ cluster information (overview, nodes, connections) using callbacks.

const client = require('http-rabbitmq-manager').client({ host: process.env.RABBITMQ_HOST ?? 'localhost', port: parseInt(process.env.RABBITMQ_MANAGEMENT_PORT ?? '15672'), timeout: parseInt(process.env.RABBITMQ_TIMEOUT ?? '25000'), user: process.env.RABBITMQ_USER ?? 'guest', password: process.env.RABBITMQ_PASSWORD ?? 'guest' }); console.log('Fetching RabbitMQ cluster overview...'); client.overview(function (err, res) { if (err) { console.error('Error fetching overview:', err.message); return; } console.log('Overview:', JSON.stringify(res, null, 2)); console.log('\nListing all nodes...'); client.listNodes(function (err, nodes) { if (err) { console.error('Error listing nodes:', err.message); return; } console.log('Nodes:', JSON.stringify(nodes, null, 2)); console.log('\nListing all connections...'); client.listConnections(function (err, connections) { if (err) { console.error('Error listing connections:', err.message); return; } console.log('Connections:', JSON.stringify(connections, null, 2)); }); }); });
Debug
Known issues
breakingThis package officially supports only RabbitMQ 3.x versions. Modern RabbitMQ versions (e.g., 4.x, 3.12+) have significant changes, and this client may not be compatible or function correctly.
fix
Consider using a more current RabbitMQ client library or interacting directly with the HTTP API if you are on newer RabbitMQ versions. Evaluate `rabbitmq-management-client` (Rust, but indicates features of modern clients) or `pulumi/rabbitmq` (Pulumi provider) for alternatives, or other generic HTTP clients.
affects: >=0.0.1
gotchaThe package is in version 0.0.4 and has seen no commits in over seven years, indicating it is abandoned. There will be no new features, bug fixes, or security updates. The API should be considered unstable.
fix
Use with extreme caution. For production environments, consider alternative, actively maintained RabbitMQ clients or management tools.
affects: >=0.0.1
gotchaThis library relies on the RabbitMQ Management UI plugin being installed and enabled on your RabbitMQ server. Without it, the HTTP API endpoints will not be available, and the client will fail to connect or retrieve data.
fix
Ensure the RabbitMQ Management UI plugin is enabled on your RabbitMQ server. Typically, this can be done via `rabbitmq-plugins enable rabbitmq_management`. Verify the default port (15672) is accessible.
affects: >=0.0.1
gotchaThe API exclusively uses Node.js callback patterns for asynchronous operations. This can lead to 'callback hell' in complex scenarios and is less ergonomic than modern Promise-based or `async/await` patterns.
fix
Wrap callback-based functions in Promises using `util.promisify` for better integration into modern `async/await` codebases, or consider using a different, actively maintained client library that offers Promise support.
affects: >=0.0.1
gotchaFor long-term monitoring, alerting, and advanced visualization of RabbitMQ metrics, official RabbitMQ documentation recommends using Prometheus and Grafana, as the HTTP API is primarily for basic observability. Relying solely on this client for comprehensive monitoring might be insufficient.
fix
Integrate dedicated monitoring solutions like Prometheus and Grafana for robust RabbitMQ metric collection and analysis in production environments.
affects: >=0.0.1
Errors
Common errors & fixes
TypeError: require(...) is not a function
Attempting to call the main module export directly instead of accessing the `client` property.
fix
Use `const client = require('http-rabbitmq-manager').client({ /* config */ });` to correctly access the client factory.
Error: connect ECONNREFUSED
The RabbitMQ server is not running, the Management UI plugin is not enabled, or the `host` or `port` configuration is incorrect.
fix
Verify RabbitMQ server status and ensure the `rabbitmq_management` plugin is enabled. Check that the configured `host` and `port` (default 15672) match your RabbitMQ management interface.
401 Unauthorized (or similar HTTP status in error callback)
Incorrect `user` or `password` provided in the client configuration.
fix
Double-check the username and password for a user with management permissions in your RabbitMQ instance.
TypeError: client.overview is not a function
The `client` object was not correctly initialized, likely because the `.client()` method was not called or its return value wasn't assigned.
fix
Ensure the client is properly instantiated: `const client = require('http-rabbitmq-manager').client({ /* config */ });`.
Error: Timeout of XXXXms exceeded (or similar timeout error)
The API request took longer than the configured `timeout` value, or the RabbitMQ HTTP API is experiencing high load or slowness.
fix
Increase the `timeout` option in the client configuration if your network or RabbitMQ server response times are consistently high. Investigate RabbitMQ server performance if timeouts persist.
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources