Workspace 7.0.2
MqttSubscribeLoop

Users can define a Workspace loop body that subscribes to (and processes) messages received over a MQTT broker.

  • Default label: "Mqtt subscribe loop"
  • Member of plug-in: Mqtt
  • Catalogue path: Mqtt
Inputs:
Enable loopboolIf true, the loop will execute multiple iterations, based on its control inputs. If false, the loop will execute a single iteration only.
WrapboolIf true, once the loop has completed its final iteration and satisfies its termination condition, it will restart executing from the first iteration again. This can be useful for UI-driven applications where continuous (but repeating) feedback loops are required.
First iteration?CSIRO::DataExecution::Dependency

DataQByteArray

TopicQString

Client IDQString

UsernameQString

HostQStringThe hostname or ip address of the broker to connect to
PortintThe network port to connect to. Usually 1883
Keep aliveintThe number of seconds after which the broker should send a PING message to the client if no other messages have been exchanged in that time
ReconnectboolEnable 'Reconnect' per execution. When unticked, the previous execution of the operation may retain the connection and cache a queue of received messages. When enabled, the operation will force a reconnection, even if the broker address remains the same.
User nameQStringWhen a username is provided, only the matching credential will be used. When '*' is used or left empty, the system will attempt all available credentials until it finds one that can connect to the broker. In both cases, an attempt to connect anonymously would be a last resort if no other credentials are accepted.
TopicsQStringList

Topics to subscribe

Outputs:
Keep looping?bool