[ { "id": "worker-demo-tab", "type": "tab", "label": "POD Gateway · Worker In/Out", "disabled": false, "info": "One-tab demo of Gateway Worker In/Out: gateway-side logic with no upstream HTTP adapter, no API config and no rate-limited external call. Includes the msg._workerError failure path. Start Redis first." }, { "id": "worker-server-config", "type": "pod-gateway-server-config", "name": "Central Gateway + Redis", "host": "0.0.0.0", "port": 8080, "path": "/ws", "redisUrl": "redis://127.0.0.1:6379", "redisRejectUnauthorized": true, "redisKeyPrefix": "pod-gateway-worker-demo", "redisConsumer": "worker-demo-gateway", "redisMaxQueueSize": 10000, "redisResultTtlSeconds": 3600, "redisDeleteOnAck": true, "redisRetryPollMs": 250, "rateLimits": "{}", "concurrency": 8, "upstreamTimeoutMs": 60000, "maxAttempts": 0, "verboseLogging": false, "credentials": {} }, { "id": "worker-in", "type": "pod-gateway-worker-in", "z": "worker-demo-tab", "name": "Worker In: worker/uppercase", "server": "worker-server-config", "operation": "worker/uppercase", "label": "Worker · Uppercase", "timeout": 55000, "maxPayloadBytes": 1048576, "description": "Uppercases msg.payload.text entirely inside this gateway flow -- no upstream HTTP adapter involved.", "x": 170, "y": 500, "wires": [["worker-logic"]] }, { "id": "worker-logic", "type": "function", "z": "worker-demo-tab", "name": "Uppercase or fail", "func": "if (!msg.payload || typeof msg.payload.text !== 'string' || msg.payload.text.trim() === '') {\n msg._workerError = { code: 'EMPTY_TEXT', message: 'msg.payload.text must be a non-empty string', retryable: false };\n} else {\n msg.payload = { text: msg.payload.text.toUpperCase() };\n}\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 400, "y": 500, "wires": [["worker-out"]] }, { "id": "worker-out", "type": "pod-gateway-worker-out", "z": "worker-demo-tab", "name": "Worker Out", "x": 620, "y": 500, "wires": [] }, { "id": "worker-pod-gateway", "type": "pod-gateway-config", "name": "POD connector", "url": "ws://127.0.0.1:8080/ws", "podId": "pod-worker-demo", "connectTimeout": 10000, "reconnectInterval": 3000, "verboseLogging": false, "credentials": {} }, { "id": "worker-call-inject-text", "type": "inject", "z": "worker-demo-tab", "name": "Call with text", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "{\"text\":\"hello gateway worker\"}", "payloadType": "json", "x": 150, "y": 80, "wires": [["worker-call"]] }, { "id": "worker-call-inject-empty", "type": "inject", "z": "worker-demo-tab", "name": "Call with empty text", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "{\"text\":\"\"}", "payloadType": "json", "x": 160, "y": 140, "wires": [["worker-call"]] }, { "id": "worker-call", "type": "pod-gateway-call", "z": "worker-demo-tab", "name": "Gateway Call: worker/uppercase", "gateway": "worker-pod-gateway", "operation": "worker/uppercase", "timeout": 60000, "priority": "normal", "x": 430, "y": 110, "wires": [["worker-call-result"], ["worker-call-error"]] }, { "id": "worker-call-result", "type": "debug", "z": "worker-demo-tab", "name": "Result", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 660, "y": 80, "wires": [] }, { "id": "worker-call-error", "type": "debug", "z": "worker-demo-tab", "name": "Error (EMPTY_TEXT)", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 660, "y": 140, "wires": [] } ]