Dec 20, 2015 Replies: 51 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: Code: AddPermission(android.permission.INTERNET) Using this library is simple: Code: 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: Jul 17, 2019 Click to expand...
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: Code: AddPermission(android.permission.INTERNET) Using this library is simple: Code: 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.
Erel B4X founder Staff member Licensed User Longtime User Nov 3, 2016 #41 V1.04 is attached to the first post. It disables the unwanted websocket port.
udg Expert Licensed User Longtime User Feb 12, 2017 #42 Hi @Erel , just an update about current jBroker component. 1. Is QOS level 2 available and working? 2. Is SSL available? Anyway, is it planned a major update of the component in the near future or do you advice on setting up a full mosquitto (or similar) deploy for a real world project? Thank you. udg
Hi @Erel , just an update about current jBroker component. 1. Is QOS level 2 available and working? 2. Is SSL available? Anyway, is it planned a major update of the component in the near future or do you advice on setting up a full mosquitto (or similar) deploy for a real world project? Thank you. udg
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2017 #43 Both are currently not supported. They might be supported in the future. MqttBroker is useful for smaller solutions as it is embedded in the app, in other cases you need to use a more powerful broker such as mosquitto.
Both are currently not supported. They might be supported in the future. MqttBroker is useful for smaller solutions as it is embedded in the app, in other cases you need to use a more powerful broker such as mosquitto.
coslad Well-Known Member Licensed User Longtime User May 14, 2017 #44 Hi Erel , last https://github.com/andsel/moquette updates is 09 april 2017 can you evalutate an B4X lib update ? Thanks
Hi Erel , last https://github.com/andsel/moquette updates is 09 april 2017 can you evalutate an B4X lib update ? Thanks
Johan Hormaza Well-Known Member Licensed User Longtime User Jun 13, 2018 #45 coslad said: Hi Erel , last https://github.com/andsel/moquette updates is 09 april 2017 can you evalutate an B4X lib update ? Thanks Click to expand... Truth @Erel
coslad said: Hi Erel , last https://github.com/andsel/moquette updates is 09 april 2017 can you evalutate an B4X lib update ? Thanks Click to expand... Truth @Erel
Erel B4X founder Staff member Licensed User Longtime User Jan 1, 2019 #46 V2 released. See the first post. Note that V2 cannot run on Android.
janderkan Well-Known Member Licensed User Longtime User Jan 1, 2019 #47 Erel said: moquette v0.012 Click to expand... I think it must be v0.12
Erel B4X founder Staff member Licensed User Longtime User Jan 1, 2019 #48 Not exactly clear but I've changed it. https://github.com/andsel/moquette/releases
Erel B4X founder Staff member Licensed User Longtime User Feb 5, 2019 #49 V2.01 - Changes an internal auto-flush timeout that caused delays in some cases.
narek adonts Well-Known Member Licensed User Longtime User May 4, 2019 #50 hi, how to prevent user A to subsxribe to TOPIC B for example. I think that if the broker xould raise some events like, onSubscribe, onConnect, onPublish,... and like in jSerber Filters allowing with return True or False. For exemlle I am trying to implement a chat server and I need to send a push notification if the user is offline. but i need to see Events for this. would be great to have some events for the broker
hi, how to prevent user A to subsxribe to TOPIC B for example. I think that if the broker xould raise some events like, onSubscribe, onConnect, onPublish,... and like in jSerber Filters allowing with return True or False. For exemlle I am trying to implement a chat server and I need to send a push notification if the user is offline. but i need to see Events for this. would be great to have some events for the broker
Erel B4X founder Staff member Licensed User Longtime User May 5, 2019 #51 The broker is not a server by itself. It is just a black box that manages the clients. You can add another client (in the same process if you like) that will act as a server. For further discussion please start a new thread.
The broker is not a server by itself. It is just a black box that manages the clients. You can add another client (in the same process if you like) that will act as a server. For further discussion please start a new thread.
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2019 #52 V2.02 - Fixes a compatibility issue with B4JPackager 11.