GetLastMessage

This MQTT function retrieves the last message (filtered by topic ) from to the MQTT broker.

Group:  MQTT Object

Syntax: Private Sub oMQTT_OnMessageArrived(ByVal Topic As String, ByVal Message As String)

Example:

Private Sub btnCheckSub_Click()

On Error Resume Next

Dim sReturn As String

sReturn = moClient.GetLastMessage(txtTopic.Text)

App.MsgBox("Last payload in topic: " & txtTopic.Text & "\n" & sReturn)

End Sub

Versions Supported:         RFgen 5.1.1.35 and 5.2.3 and newer.