B4J Library jMQTT - Official MQTT client

Status
Not open for further replies.
Implementation of MQTT client based on the Paho open source project: http://www.eclipse.org/paho/

See this tutorial for more information: https://www.b4x.com/android/forum/threads/iot-mqtt-protocol.59471/

jMQTT.zip holds the older version, which is compatible with B4A.
B4J_Only_jMQTT.zip - v1.25 - B4J only.

Note that it is an internal library in B4J.

If building a standalone package then add this to the main module:
B4X:
#PackagerProperty: AdditionalModuleInfoString = provides org.eclipse.paho.client.mqttv3.spi.NetworkModuleFactory with org.eclipse.paho.client.mqttv3.internal.TCPNetworkModuleFactory, org.eclipse.paho.client.mqttv3.internal.SSLNetworkModuleFactory,  org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketNetworkModuleFactory, org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketSecureNetworkModuleFactory;
 

Attachments

  • jMQTT.zip
    152 KB · Views: 1,316
  • B4J_Only_jMQTT.zip
    207.2 KB · Views: 187
Last edited:

rboeck

Well-Known Member
Licensed User
I think, it could be an interesting idea, to use (optional) MQTT for b4a bridge - we would get some interesting features: simultan distribution to many devices, no need to care about ip adresses. On the negative side i see that only one device can be an debug device and the transmission speed is not the same as in direct tcp socket connection.
 

coslad

Well-Known Member
Licensed User
Hi , the mqtt client doesn't supports keep alive parameter, will it implemented ?
 

coslad

Well-Known Member
Licensed User
I mean that it is not possible to change the keep alive timing, sometimes 60 seconds are too much and sometimes is too short
 

coslad

Well-Known Member
Licensed User
Maybe Erel should search a easiest way to wrap an Android Java library into b4a, this is the only one limit I find into the b4x product. Come on Erel !
 

madru

Active Member
Licensed User
understood, I never identified real operational issues.

But a few ... with this release:
message numbering with QoS >0 does not work - always zero.
no WS suport
no WSS support
 

Erel

Administrator
Staff member
Licensed User
message numbering with QoS >0 does not work - always zero.
We already discussed it in the past: https://www.b4x.com/android/forum/threads/mqtt-messagid.81834

Based on the last comment there it was not fixed and I still don't understand why you need it.

no WS suport
no WSS support
There is very good support for WebSockets in all B4X platforms. For now there is no plan to add MQTT over WebSockets.

Anyway, this is not the place to post feature requests. You can start new threads in the wishlist forum. Do know that I will ignore requests that are not properly explained with real use cases.
 
Status
Not open for further replies.
Top