Dear community,
I´m using B4i MQTTclient in conjunction with Mosquitto on Ubuntu and I get the following strange behaviour :
I publish 2 topics in sequence like this :
Everything works perfect except the arrival of the messages.
I´m expecting the event "client_MessageArrived" 2x raised, but I only get it 1x,
funnily enough the first publish ("Hello").
In the logs of the broker I can see that both messages was received and send..
btw, same behaviour with Mosquitto and with the B4J MQTT broker.
Any ideas what I´m doing wrong ?
I´m using B4i MQTTclient in conjunction with Mosquitto on Ubuntu and I get the following strange behaviour :
I publish 2 topics in sequence like this :
B4X:
..
SendMessage("All/votes/questions","hello " & DateTime.Time(DateTime.Now) )
SendMessage("All/votes/questions","hello2 " & DateTime.Time(DateTime.Now) )
..
Public Sub SendMessage( Topic As String,Body As String)
If connected Then
client.Publish2(Topic, CreateMessage(Body), 2, True)
End If
End Sub
Private Sub client_MessageArrived (Topic As String, Payload() As Byte)
If Topic.Contains( "All/votes") Then
....
end if
Everything works perfect except the arrival of the messages.
I´m expecting the event "client_MessageArrived" 2x raised, but I only get it 1x,
funnily enough the first publish ("Hello").
In the logs of the broker I can see that both messages was received and send..
btw, same behaviour with Mosquitto and with the B4J MQTT broker.
Any ideas what I´m doing wrong ?