{"id":16387,"library":"http-rabbitmq-manager","title":"RabbitMQ HTTP API Client","description":"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.","status":"abandoned","version":"0.0.4","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install http-rabbitmq-manager","lang":"bash","label":"npm"},{"cmd":"yarn add http-rabbitmq-manager","lang":"bash","label":"yarn"},{"cmd":"pnpm add http-rabbitmq-manager","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The main module export is an object; the `client` factory function is a property on it. This package uses CommonJS `require` syntax.","wrong":"const managerClient = require('http-rabbitmq-manager')({ /* config */ });","symbol":"client","correct":"const managerClient = require('http-rabbitmq-manager').client({ /* config */ });"}],"quickstart":{"code":"const client = require('http-rabbitmq-manager').client({\n  host: process.env.RABBITMQ_HOST ?? 'localhost',\n  port: parseInt(process.env.RABBITMQ_MANAGEMENT_PORT ?? '15672'),\n  timeout: parseInt(process.env.RABBITMQ_TIMEOUT ?? '25000'),\n  user: process.env.RABBITMQ_USER ?? 'guest',\n  password: process.env.RABBITMQ_PASSWORD ?? 'guest'\n});\n\nconsole.log('Fetching RabbitMQ cluster overview...');\nclient.overview(function (err, res) {\n  if (err) {\n    console.error('Error fetching overview:', err.message);\n    return;\n  }\n  console.log('Overview:', JSON.stringify(res, null, 2));\n\n  console.log('\\nListing all nodes...');\n  client.listNodes(function (err, nodes) {\n    if (err) {\n      console.error('Error listing nodes:', err.message);\n      return;\n    }\n    console.log('Nodes:', JSON.stringify(nodes, null, 2));\n\n    console.log('\\nListing all connections...');\n    client.listConnections(function (err, connections) {\n      if (err) {\n        console.error('Error listing connections:', err.message);\n        return;\n      }\n      console.log('Connections:', JSON.stringify(connections, null, 2));\n    });\n  });\n});","lang":"javascript","description":"Instantiate the client and demonstrate fetching basic RabbitMQ cluster information (overview, nodes, connections) using callbacks."},"warnings":[{"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.","message":"This 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.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use with extreme caution. For production environments, consider alternative, actively maintained RabbitMQ clients or management tools.","message":"The 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.","severity":"gotcha","affected_versions":">=0.0.1"},{"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.","message":"This 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.","severity":"gotcha","affected_versions":">=0.0.1"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Integrate dedicated monitoring solutions like Prometheus and Grafana for robust RabbitMQ metric collection and analysis in production environments.","message":"For 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.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Use `const client = require('http-rabbitmq-manager').client({ /* config */ });` to correctly access the client factory.","cause":"Attempting to call the main module export directly instead of accessing the `client` property.","error":"TypeError: require(...) is not a function"},{"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.","cause":"The RabbitMQ server is not running, the Management UI plugin is not enabled, or the `host` or `port` configuration is incorrect.","error":"Error: connect ECONNREFUSED"},{"fix":"Double-check the username and password for a user with management permissions in your RabbitMQ instance.","cause":"Incorrect `user` or `password` provided in the client configuration.","error":"401 Unauthorized (or similar HTTP status in error callback)"},{"fix":"Ensure the client is properly instantiated: `const client = require('http-rabbitmq-manager').client({ /* config */ });`.","cause":"The `client` object was not correctly initialized, likely because the `.client()` method was not called or its return value wasn't assigned.","error":"TypeError: client.overview is not a function"},{"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.","cause":"The API request took longer than the configured `timeout` value, or the RabbitMQ HTTP API is experiencing high load or slowness.","error":"Error: Timeout of XXXXms exceeded (or similar timeout error)"}],"ecosystem":"npm"}