B4J Question jMQTT errors

Blueforcer

Well-Known Member
Licensed User
Longtime User
I have a non-UI App wich should run 24/7.
It runs the jMQTT Broker and the jMQTT Client.
There is also an ESP wich is connected to the Broker.

The MQTT Client in my B4J App sends, in fast intervals, various commands to the ESP Client through the Broker. (With QOS 0 )
This runs great for some time, but as soon the ESP lost his connection to the Broker and try to reconnect, the Broker throws a massive ammount of Errors.

B4X:
Serious error processing the message org.eclipse.moquette.proto.messages.PublishMessage@280ffa30 for session [clientID: AWTRIX]org.eclipse.moquette.server.netty.NettyChannel@4c05e7e2
AWTRIX (as the mentioned clientID) is the jMQTT Client in my B4J App

from this point on the mermory consumption gets crazy, until it throws "java.lang.OutOfMemoryError: Java heap space" errors and the app finally crashs.
upload_2018-12-26_22-51-54.png

also because i redirect my logoutput to a file, the filesize become over 100MB, only with this errors. Of course my jMQTT Client dont stop sending the commands (There is no event or anything else to catch this error and stop my application to prevent it from crashing)

apart from the totally uncontrolled behavior, there are apparently similar problems wich seems to be already fixed in newer versions of moquette.
https://github.com/andsel/moquette/issues/4

is there any chance to get an jMQTT Broker update to the latest moquette?
 

Blueforcer

Well-Known Member
Licensed User
Longtime User
I tried it with Mosquitto, got no errors at all.
But Mosquitto is way slower than moquette, what's unacceptable for my purposes.
jMQTT Broker runs very fast nearly without any Delays between the publishes.

the jMQTT Broker is nearly 3 1/2 Years old (moquette V0.7), 1 Month ago andsel released 0.12. Would be great to get an update or publish the sourcecode, so maybe the community can update it.
 
Last edited:
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
Thanks.
I like the way to use a broker inside an app. So the user doesn't need anything to install and configure . Especially when the app should run on different platforms its lot easier for supporting.
 
Upvote 0
Top