mqttin

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

MQTT In node

Type: mqttIn
Category: Network

Subscribes to an MQTT broker topic and emits received messages.

Behavior

This node is registered as mqttIn and runs as part of a workflow. Its exact runtime behavior is implemented in node.go; this document summarizes the editor-facing purpose and configuration contract.

Configuration

Field Type Default Description
broker ``
cleansession boolean true Clean Session
clientid ``
datatype string auto Payload Type — auto: try JSON parse, fall back to string; utf8: plain string; json: parse (failures emit raw string); base64: encode raw bytes
keepalive integer 0 Keep Alive — MQTT keepalive in seconds; 0 uses the library default
password string Password — Optional broker password (credential: masked, never exported)
qos integer 0 QoS
shareGroup ``
tls ``
tlsca ``
tlscert ``
tlsinsecure boolean false Skip Peer Verification — Disables broker certificate verification (insecure opt-out)
tlskey ``
tlsservername ``
topic ``
username string Username — Optional broker username (credential: masked, never exported)
usetls boolean false Use TLS — Dial the broker over TLS (implied by an ssl:// address)
willpayload ``
willqos integer 0 Will QoS
willretain boolean false Will Retain
willtopic ``

Implementation

  • node.go contains the executor, validation, schema, and registration.
  • editor.html contains the editor integration.
  • node_test.go, when present, contains behavioral tests.

Documentation

Overview

Package mqttin contains the mqttIn node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTInConfig

type MQTTInConfig struct {
	nodebase.MQTTConnConfig
	// Topic is the subscription topic; MQTT wildcards + and # work.
	Topic string `json:"topic"`
	// QoS is the subscription quality of service (0|1|2).
	QoS int `json:"qos"`
	// Datatype selects payload decoding: "auto" (JSON parse, else
	// string), "utf8" (string), "json" (parse or error), "base64".
	Datatype string `json:"datatype"`
	// ShareGroup, when set, turns the subscription into an MQTT shared
	// subscription: the filter becomes $share/<group>/<topic> and the
	// broker load-balances deliveries across all subscribers in the
	// group (active-active triggers for multi-runner deployments).
	// A raw $share/<group>/<topic> value in Topic also works and is
	// passed through unchanged.
	ShareGroup string `json:"shareGroup"`
}

MQTTInConfig holds configuration for the mqttIn node. The embedded MQTTConnConfig carries the connection block (broker address or an mqttBroker config-node id, credentials, clientID, clean session, keepalive, TLS and last-will fields).

type MQTTInNode

type MQTTInNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

MQTTInNode subscribes to an MQTT broker topic on deploy and emits every received message downstream. It is a Stopper: the client lives on the node instance itself (activation runs Execute once and the same instance is kept for Stop).

func NewMQTTInNode

func NewMQTTInNode(node nodestore.NodeInterface, config *MQTTInConfig, host nodebase.NodeHost) *MQTTInNode

NewMQTTInNode creates a new mqttIn node

func (*MQTTInNode) Execute

Execute connects to the broker and subscribes. The connect happens synchronously so an unreachable broker surfaces as a deploy error.

func (*MQTTInNode) Stop

func (n *MQTTInNode) Stop() error

Stop disconnects the broker client.

func (*MQTTInNode) Validate

func (n *MQTTInNode) Validate() error

Validate checks the mqttIn node configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL