MQTT Transmission with Python Scripting - Buffer Messages

I’m trying to use the manual python publish function from the MQTT Transmission module.

My goal is to send an event driven JSON message via the MQTT protocol to a customer’s broker.

system.cirruslink.transmission.publish(mqttServerName, topic, payload, qos, retained)

I can successfully send a message and the Broker receives the message.

However, when the broker is offline or the connection cannot be established, it appears that there is no buffering or store and forward included with this function. I have a History Store set up with this transmitter, but appears it doesn’t get used.

Is it true that the History Store does not work with the function above?

Being able to buffer these messages when the broker is offline is a requirement for the solution I’m trying to create. Would I be better off using REST API?

Store and forward only applies to Transmitters and the associated Sparkplug Edge Nodes that are created from those Transmitters. The publish scripting API does not use/support store and forward.

Ok thanks, that is what I thought.

I really wish that the system.cirruslink.transmission.publish() function at least returned a result back to the scripting layer. It’s a fire-and-forget function that doesn’t care if it succeeds or not.

Even if it just returned a bool of True False on whether the operation succeeded.. I could then put all my messages in a queue of some sort, then have a job try to send them using the function above, retrying if the last message failed to deliver.

This is a feature in our backlog and should be added fairly soon.