Registry / communication / node-red-contrib-amqp-ack

node-red-contrib-amqp-ack

JSON →
library1.1.2jsnpmunverified

The `node-red-contrib-amqp-ack` package provides Node-RED users with robust input and output nodes for interacting with AMQP message brokers like RabbitMQ. Its core functionality includes subscribing to (input) and publishing to (output) AMQP exchanges or queues, with explicit support for message acknowledgment and prefetch count control, ensuring more reliable message processing within Node-RED flows. The package, currently at stable version 1.1.2, has a slow release cadence for new features, with the last significant update dating back four years. A key differentiator is its focus on reliable message delivery through configurable ack and prefetch mechanisms, which are crucial for preventing message loss or excessive load on Node-RED instances. It bundles the `amqp-ts` library for underlying AMQP connectivity, which itself is built upon `amqplib`. However, the `amqp-ts` dependency is largely unmaintained, presenting significant compatibility issues with modern Node.js versions.

npm install node-red-contrib-amqp-ack
INSTALL
IMPORT
SIG · NODE-RED-CONTRIB-A
N
node-red-contrib-amqp-ack
communicationjavascriptv1.1.2
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.

Node-RED Node Registration
RED.nodes.registerType('amqp in', AmqpInNode); RED.nodes.registerType('amqp out', AmqpOutNode); RED.nodes.registerType('amqp ack', AmqpAckNode); RED.nodes.registerType('amqp-server', AmqpServerConfigNode);
import { AmqpInNode } from 'node-red-contrib-amqp-ack';
These are internal Node-RED registrations, typically found within the node's `.js` definition files. End-users interact with nodes by dragging them from the Node-RED editor palette. Direct ESM/CJS imports in user-land JavaScript are not how these Node-RED contrib nodes are typically consumed.
Loading Node Definitions (Internal Node-RED)
const AmqpInNode = require('./nodes/amqp-in.js'); const AmqpOutNode = require('./nodes/amqp-out.js'); const AmqpAckNode = require('./nodes/amqp-ack.js'); const AmqpServerConfigNode = require('./nodes/amqp-server.js');
import AmqpInNode from 'node-red-contrib-amqp-ack/nodes/amqp-in';
This CommonJS `require` pattern is how Node-RED's runtime loads individual node definition files, typically from within the package's directory. ESM imports are not supported for these internal Node-RED node files.

This Node-RED flow demonstrates basic AMQP publish/subscribe with manual acknowledgment and prefetch. It includes an AMQP input node configured with acknowledgment, a debug node to display messages, and an AMQP ack node to manually acknowledge the message after processing. An inject node triggers an AMQP output node to publish messages to a specified exchange. A shared 'amqp-server' configuration node manages the connection to the RabbitMQ broker.

[{"id":"d16f7e8a.401828","type":"tab","label":"AMQP Ack/Prefetch Example","disabled":false,"info":"Example flow demonstrating AMQP input with acknowledgment and output."},{"id":"28b1e42a.5b512","type":"amqp in","z":"d16f7e8a.401828","name":"Listen to Queue (Ack)","server":"80c32d43.6826c8","exchange":"my-exchange","queue":"my-queue","exchangeType":"topic","routingKey":"#","noAck":false,"prefetch":1,"x":160,"y":120,"wires":[["71a7d6e6.2e47e8","65c3e7b.6f23e48"]]},{"id":"71a7d6e6.2e47e8","type":"debug","z":"d16f7e8a.401828","name":"Received Message","topic":"","property":"payload","x":390,"y":120,"wires":[]},{"id":"65c3e7b.6f23e48","type":"amqp ack","z":"d16f7e8a.401828","name":"Acknowledge Message","server":"80c32d43.6826c8","x":390,"y":180,"wires":[]},{"id":"ae7d5c7b.8f3b28","type":"inject","z":"d16f7e8a.401828","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"my.key","payload":"Hello AMQP","payloadType":"str","x":140,"y":300,"wires":[["69f41b9.5a52868"]]},{"id":"69f41b9.5a52868","type":"amqp out","z":"d16f7e8a.401828","name":"Publish to Exchange","server":"80c32d43.6826c8","exchange":"my-exchange","exchangeType":"topic","routingKey":"my.key","x":390,"y":300,"wires":[]},{"id":"80c32d43.6826c8","type":"amqp-server","name":"RabbitMQ Local","host":"localhost","port":"5672","vhost":"/","clientid":"node-red","heartbeat":"60","topology":"[]","tls":""}]
Debug
Known issues
breakingThe underlying `amqp-ts` library is unmaintained and is anchored to `amqplib@0.4.2`, which only supports Node.js versions up to 8. This package is incompatible with modern Node.js runtimes (Node.js 10+).
fix
It is strongly recommended to migrate to an alternative Node-RED AMQP package, such as `@meowwolf/node-red-contrib-amqp`, for compatibility with current Node.js versions. If migration is not an option, ensure your Node-RED instance runs on Node.js 8 or older, which is not recommended for security or performance.
affects: >=1.0.0
deprecatedThis package is explicitly recommended to be replaced by alternative AMQP Node-RED contributions for environments using modern Node.js versions due to its core dependency's outdated status.
fix
Consider uninstalling this package and installing `@meowwolf/node-red-contrib-amqp` via the Node-RED Palette Manager or npm: `npm install @meowwolf/node-red-contrib-amqp`.
affects: >=1.0.0
gotchaEntering invalid credentials (username/password) in the AMQP configuration node can lead to Node-RED malfunctioning or becoming unresponsive, as the connection attempts might consume excessive resources.
fix
Always double-check AMQP server credentials. Monitor Node-RED logs for connection errors. Ensure the RabbitMQ server is accessible and configured correctly.
affects: >=1.0.0
gotchaWhen `noAck` is unchecked on the 'amqp in' node, messages are not automatically acknowledged. Failure to use an 'amqp ack' node downstream will leave messages unacknowledged in the queue, leading to redelivery upon connection loss or message processing timeout.
fix
For reliable processing, always follow an 'amqp in' node with `noAck` unchecked by an 'amqp ack' node once message processing is complete. Implement error handling to ensure `nack` or `reject` is used for failed messages.
affects: >=1.0.0
Errors
Common errors & fixes
Failed to load flow: Error: Cannot find module 'amqplib/lib/connection'.
The underlying `amqp-ts` library uses an old version of `amqplib` which is incompatible with newer Node.js versions or has module resolution issues in certain environments.
fix
Upgrade your Node-RED instance to use a different AMQP package like `@meowwolf/node-red-contrib-amqp` which supports modern Node.js. If you must use this package, downgrade your Node.js runtime to version 8 or older (not recommended).
Error: read ECONNRESET / Connection closed. No error event. / Amqp rabbit disconnected issue.
The connection to the AMQP broker (e.g., RabbitMQ) was unexpectedly closed, often due to network instability, broker restart, or incorrect broker configuration.
fix
Verify network connectivity between Node-RED and the AMQP broker. Check RabbitMQ server logs for client disconnect reasons. Ensure the AMQP server configuration node has correct hostname, port, and vhost settings. While the node attempts reconnection, persistent issues require external resolution.
Messages are received by the 'amqp in' node but disappear without being processed by subsequent nodes, or are re-delivered repeatedly.
The 'amqp in' node is configured with 'noAck' unchecked, but no 'amqp ack' node is present in the flow to acknowledge messages after processing, leading to the broker re-queueing them.
fix
Ensure that every 'amqp in' node configured for explicit acknowledgment (`noAck` unchecked) has a corresponding 'amqp ack' node in its processing path to confirm message consumption. Place the 'amqp ack' node after all processing steps have successfully completed.
Upgrade
Version history
1.1.2latest on npm
Audit
Dependencies
node-redrequiredRequired for Node-RED runtime environment to load and use the nodes.
amqp-tsrequiredCore library for AMQP connectivity, though it is unmaintained and causes compatibility issues with modern Node.js.
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
3
Resources
node-red-contrib-amqp-ack — npm install node-red-contrib-amqp-ack · libregistry