jMqttBroker library is based on the moquette open source project: https://github.com/andsel/moquette
It implements a MQTT broker. If you are not familiar with MQTT then start with this tutorial: https://www.b4x.com/android/forum/threads/59471/#content
The broker is like a "black box". It is responsible for managing the clients and routing the messages.
With this library you can embed the broker inside your app instead of using an external broker.
Note that this library can also be used with B4A. You can turn any Android or Linux board to a MQTT broker.
With B4A you need to add the INTERNET permission with the manifest editor:
Using this library is simple:
jMQTTBroker V1: www.b4x.com/b4j/files/moqueutte.zip
jMQTTBroker v2 based on moquette v0.12 (December 2018) is available here: www.b4x.com/b4j/files/jMqttBroker2.zip
Unlike v1, the new version is not compatible with B4A.
Updates:
V2.02 - Fixes a compatibility issue with B4JPackager 11.
V2.01 - Changes an internal auto-flush timeout that caused delays.
It implements a MQTT broker. If you are not familiar with MQTT then start with this tutorial: https://www.b4x.com/android/forum/threads/59471/#content
The broker is like a "black box". It is responsible for managing the clients and routing the messages.
With this library you can embed the broker inside your app instead of using an external broker.
Note that this library can also be used with B4A. You can turn any Android or Linux board to a MQTT broker.
With B4A you need to add the INTERNET permission with the manifest editor:
B4X:
AddPermission(android.permission.INTERNET)
Using this library is simple:
B4X:
Sub Process_Globals
Dim broker As MqttBroker
End Sub
Sub AppStart (Args() As String)
broker.Initialize("", 51041) 'first parameter is the event name. It is currently not used.
broker.DebugLog = True
broker.Start
StartMessageLoop 'Non-UI app
End Sub
jMQTTBroker V1: www.b4x.com/b4j/files/moqueutte.zip
jMQTTBroker v2 based on moquette v0.12 (December 2018) is available here: www.b4x.com/b4j/files/jMqttBroker2.zip
Unlike v1, the new version is not compatible with B4A.
Updates:
V2.02 - Fixes a compatibility issue with B4JPackager 11.
V2.01 - Changes an internal auto-flush timeout that caused delays.
Last edited: