Registered StackHub users may elect to receive email notifications whenever a new package version is released or a comment is posted on the forum.
There is 1 watcher.
Publish a single Str message to a topic using a previously constructed pahoMqttPublisher instance
The Ref provided must match a record found in folio.
Examples:
pahoMqttPublisher({brokerUrl:`tcp://host:1883`, username:"username", password:"password", qos:1, retained:true, clientId:"myClientId"}).pahoMqttPublish("myMessage","myTopic")
Side effects:
Create a new pahoMqttPublisher instance which can be used to publish multiple messages. It is the responsibility of the caller to close this publisher when publishing is complete, using the pahoMqttPublisherClose call.
The brokerUrl
must be provided and can be a Uri or a Str.
If username
is provided, then password
is also expected.
The cleanSession
is optional and will default to false.
The retained
is optional and will default to false.
The qos
is optional and will default to 1.
The clientId
is optional and will default to a random UUID if not supplied.
Examples:
pahoMqttPublisher({brokerUrl:`tcp://host:1883`, username:"username", password:"password", qos:1, retained:true, clientId:"myClientId"})
Side effects:
Close a previously constructed pahoMqttPublisher instance
Examples:
pahoMqttPublisher({brokerUrl:`tcp://host:1883`, username:"username", password:"password", qos:1, retained:true, clientId:"myClientId"}).pahoMqttPublisherClose()
Side effects:
Create a new pahoMqttSubscriber record and register it within the list of Subscribers being managed.
The brokerUrl
must be provided and must be a URI.
The topics
must be provided and must be a List of Str.
The parser
must be provided. This should match the name of an Axon function that takes two Str parameters: (topic, message). This parser will be used for all messages from all the topics listed.
The qos
is optional and will default to 1. See MQTT Docs for details on QOS.
The clientId
is optional and will default to a random UUID if not supplied.
If username
is provided, then the optional second parameter for password is also expected. These will be supplied to the broker on connection. If you have a non-authenticating broker, just leave out username and drop the second parameter.
Examples:
pahoMqttSubscriberAdd({brokerUrl:`tcp://host:1883`, topics:["topic/one","topic/two"], parser:"myMsgParser", qos:1}) pahoMqttSubscriberAdd({brokerUrl:`tcp://host:1883`, topics:["topic/one","topic/two"], parser:"myMsgParser", clientId:"myClientId", username:"username"}, "password")
Side effects:
Delete a Subscriber passing the Ref ID of the folio record corresponding to it.
The Ref provided must match a record found in folio.
Examples:
pahoMqttSubscriberDelete(@p:proj1:r:255481c1-42be3946)
Side effects:
Start a Subscriber passing the Ref ID of the folio record corresponding to it.
The Ref provided must match a record found in folio.
Examples:
pahoMqttSubscriberStart(@p:proj1:r:255481c1-42be3946)
Side effects:
running
tag set to true if it succeeded in startingStart all Subscribers.
Examples:
pahoMqttSubscriberStartAll()
Side effects:
Stop a Subscriber passing the Ref ID of the folio record corresponding to it.
The Ref provided must match a record found in folio.
Examples:
pahoMqttSubscriberStop(@p:proj1:r:255481c1-42be3946)
Side effects:
running
tag set to false if it succeeded in stoppingStop all Subscribers.
Examples:
pahoMqttSubscriberStopAll()
Side effects: