Connection nodes speak of listener and sender, and of send_queue_size
mqtt and http take websocket's vocabulary: their Mode is LISTENER/SENDER, default names read mqtt_listener_… and http_listener_…, and mqtt's publish_queue_size is send_queue_size. No alias stays behind, so the flow store rewrites the old setting in every published and draft mqtt node when it opens, in the same migration as trigger → debounce. Every mqtt and http setting carries a one-line description for the editor, and the node-types reference uses one wording for direction and says that an http sender publishes a JSON object response on its outputs.
This commit is contained in:
@@ -25,9 +25,11 @@ arrive as keyword arguments.
|
||||
|
||||
### MQTT
|
||||
|
||||
**`mqtt`** — subscribe to topics, or publish what arrives on its inputs.
|
||||
**`mqtt`** — listen on topics, or send to them.
|
||||
|
||||
A node with *outputs only* subscribes; a node with *inputs* publishes.
|
||||
The ports pick the direction: outputs only make a **listener**, inputs a
|
||||
**sender**. A listener subscribes to its topics, a sender publishes its inputs
|
||||
to them.
|
||||
|
||||
| Setting | Default | Notes |
|
||||
|---|---|---|
|
||||
@@ -40,7 +42,7 @@ A node with *outputs only* subscribes; a node with *inputs* publishes.
|
||||
| `retain` | `false` | on published messages |
|
||||
| `keepalive` | `60` | seconds |
|
||||
| `timeout` | `10.0` | seconds before a broker operation is given up on |
|
||||
| `publish_queue_size` | `256` | payloads that may wait for the broker; past this the oldest is dropped and the node reports degraded |
|
||||
| `send_queue_size` | `256` | payloads that may wait for the broker; past this the oldest is dropped and the node reports degraded |
|
||||
| `json_key` | — | key to lift out of an object payload; one for every port, or `{"port": "key"}` |
|
||||
|
||||
A topic may be a filter: `+` matches one level, `#` the rest. Everything a
|
||||
@@ -55,18 +57,22 @@ unwrapped only if it contains the port's name as a key.
|
||||
|
||||
### HTTP
|
||||
|
||||
**`http`** — receive data on a webhook, or send it to a URL.
|
||||
**`http`** — listen on a webhook, or send to a URL and pass the reply on.
|
||||
|
||||
Outputs only makes it a **webhook**: the engine mounts a route at
|
||||
`/hooks/{flow}/{url}/{secret}` while the flow runs. Inputs make it a **sender**.
|
||||
The ports pick the direction: outputs only make a **listener**, inputs a
|
||||
**sender**. A listener is a **webhook**: the engine mounts a route at
|
||||
`/hooks/{flow}/{url}/{secret}` while the flow runs. A sender requests `url`
|
||||
and publishes a JSON object response on its outputs, one key per output port.
|
||||
A key no port declares fails the call, and a response that is not an object
|
||||
publishes nothing.
|
||||
|
||||
| Setting | Default | Notes |
|
||||
|---|---|---|
|
||||
| `url` | — | the route path in webhook mode, the full URL in sender mode |
|
||||
| `url` | — | the route path for a webhook, the full URL for a sender |
|
||||
| `method` | `POST` | `GET` or `POST` |
|
||||
| `timeout` | `30` | seconds, sender mode |
|
||||
| `headers` | `{}` | |
|
||||
| `query` | `{}` | fixed query parameters; a value may be a secret reference |
|
||||
| `timeout` | `30` | seconds, sender only |
|
||||
| `headers` | `{}` | request headers, sender only; a value may be a secret reference |
|
||||
| `query` | `{}` | fixed query parameters, sender only; a value may be a secret reference |
|
||||
| `send_inputs` | `true` | off when the inputs only trigger the request |
|
||||
| `secret` | — | shared secret appended to the webhook URL; takes a secret reference |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user