UNPKG

@mnn-o/node-red-rabbitmq

Version:
170 lines (169 loc) 3.98 kB
[ { "id": "4ac46355.6b3ddc", "type": "tab", "label": "Manual Nack With Links", "disabled": false, "info": "" }, { "id": "9a0f6314.32cc9", "type": "amqp-in-manual-ack", "z": "4ac46355.6b3ddc", "name": "", "broker": "", "prefetch": "1", "reconnectOnError": false, "noAck": false, "exchangeName": "", "exchangeType": "direct", "exchangeRoutingKey": "", "exchangeDurable": true, "queueName": "test-direct-queue", "queueExclusive": false, "queueDurable": true, "queueAutoDelete": false, "headers": "{}", "x": 180, "y": 180, "wires": [["8d539ac3.728408", "28d902c.a0374fe"]] }, { "id": "8d539ac3.728408", "type": "debug", "z": "4ac46355.6b3ddc", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 370, "y": 140, "wires": [] }, { "id": "28d902c.a0374fe", "type": "function", "z": "4ac46355.6b3ddc", "name": "Your business logic", "func": "\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 210, "y": 240, "wires": [["7d0c827e.032efc"]] }, { "id": "7373712.cbbce9", "type": "function", "z": "4ac46355.6b3ddc", "name": "Decide ACK mode", "func": "msg.manualAck = {\n // ackMode: \"ack\",\n // ackMode: \"ackAll\",\n ackMode: \"nack\",\n // ackMode: \"nackAll\",\n // ackMode: \"reject\",\n \n // allUpTo: true,\n // requeue: true,\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 470, "y": 360, "wires": [["ff9d6956.6f9e68", "6a6ae2e0.36238c"]] }, { "id": "6a6ae2e0.36238c", "type": "link out", "z": "4ac46355.6b3ddc", "name": "", "links": ["29a65c8a.cdd984"], "x": 635, "y": 360, "wires": [] }, { "id": "29a65c8a.cdd984", "type": "link in", "z": "4ac46355.6b3ddc", "name": "", "links": ["6a6ae2e0.36238c"], "x": 75, "y": 120, "wires": [["9a0f6314.32cc9"]] }, { "id": "7d0c827e.032efc", "type": "delay", "z": "4ac46355.6b3ddc", "name": "Work takes long time to finish", "pauseType": "delay", "timeout": "6", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "x": 310, "y": 300, "wires": [["7373712.cbbce9"]] }, { "id": "ff9d6956.6f9e68", "type": "debug", "z": "4ac46355.6b3ddc", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 670, "y": 400, "wires": [] }, { "id": "b5df106e.e7955", "type": "inject", "z": "4ac46355.6b3ddc", "name": "", "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 60, "wires": [["2ebcd4ca.ce551c"]] }, { "id": "2ebcd4ca.ce551c", "type": "amqp-out", "z": "4ac46355.6b3ddc", "name": "", "broker": "", "exchangeName": "test-direct-exchange", "exchangeType": "direct", "exchangeRoutingKey": "", "exchangeRoutingKeyType": "str", "exchangeDurable": true, "amqpProperties": "{ \"headers\": {} }", "rpcTimeoutMilliseconds": 3000, "outputs": 0, "x": 380, "y": 60, "wires": [] } ]