B4A Library MQTT - MQ Telemetry Transport for B4A

coslad

Well-Known Member
Licensed User
Longtime User
So, have you written a mtqq broker? Wonderful ! If you in the future will share the code with us should be more useful
 

jndaniels1

Member
Licensed User
Longtime User
HI Alberto.
I was referred to your post here by another user - I am (was, is) looking at rabbitMQ. And was actively trying to integrate it. But alas you have created a B4A lib to save my day.

I have a particular sensitive project that message queueing is going to be an absolute necessary --- what i am curious about is a few things.
speed ? 10s, 100s, millions per sec?
clusterable?
what if my broker crashes or reboots, will it kill the cluster or requeue messages (if set so) ?
and what about the client (app, b4a or other) keeps disconnecting - does it handle reconnects and picks up where it left off?

Thank you for your time in advance!
Kind Regards
JEFFD
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
HI Alberto.

I just donated. Do I need to donate 2 times as I need the lib for b4a and b4j.

Thanks
 

woniol

Active Member
Licensed User
Longtime User
Does the B4J version follow B4A version?
Is there B4J 1.05 available?
 

jndaniels1

Member
Licensed User
Longtime User
Hi Alberto or Erel
Ran into a bit of an error I dont know how to get around.

I am using both your libraries MQTT and XMPP --- Using the example from the MQTT zip and just adding the XMPP library produces the error below.

I simply added in the process_globals
Dim oXmpp as XMPP

Without the line the MQTT example works perfectly, installs and runs.
Any help would be super great!
Thanks!


B4X:
Convert byte code - optimized dex.      Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/visualnet/mqtt;
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
    at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
    at com.android.dx.command.dexer.Main.processClass(Main.java:732)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
    at com.android.dx.command.dexer.Main.access$300(Main.java:83)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
1 error; aborting
    Optimized dexer failed. Switching to Standard dexer.


Update:

I found in the xmpp.jar is a mqtt.class - removing the mqtt.class resolves the error. Just remember to backup your original xmpp.jar.

Cheers!
 
Last edited:

coslad

Well-Known Member
Licensed User
Longtime User
Hi Alberto, do you know if is there a way to connect a vb6 application over mqtt ?
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
@Alberto Iglesias : referring from your message from Friday. How will you manage the updating to your registered users please ?
 

klarsys

Active Member
Licensed User
Longtime User
It seems to be working!

Is this a usable version or will you upload another library?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…