node-red-contrib-natsstreaming
Version:
NATS streaming with Node-RED
18 lines (15 loc) • 459 B
JavaScript
'use-strict'
module.exports = function (RED) {
function NatsStreamingAcknowledgeNode (config) {
RED.nodes.createNode(this, config)
const node = this
// on input acknowled message
node.on('input', function (msg) {
if (msg.autoacknowledge === false) {
node.log('Acknowledging message')
msg.ack()
}
})
}
RED.nodes.registerType('nats-streaming-acknowledge', NatsStreamingAcknowledgeNode)
}