mqtt synchronous client - thread usage

261 views
Skip to first unread message

titov

unread,
Oct 2, 2013, 12:48:26 PM10/2/13
to mq...@googlegroups.com
Hi all , 

I am working on a resource constraint device which limits me on the number of threads I can use.I would like to know how many threads does the java paho client mqtt sychronous client will use on these scenarios.

This is the client class in question  --- org.eclipse.paho.client.mqttv3.MqttClient

What would be the thread usage on the following scenarios , ( I am making synchronous calls only )

1. While connecting to broker ( initial connection )
2. while subscribing to broker for a single topic and will it increase based on the number of subscriptions.
3. While I reconnect to the broker , assuming the mqtt client instance is already created.

I am not much of thread expert. I cannot run a profiler or thread monitor , but I am trying to setup a thread monitor with java concurrent executor service  on my limited hardware.
Any information on thread usage will be helpful.

Dave Locke

unread,
Oct 3, 2013, 3:43:47 AM10/3/13
to mq...@googlegroups.com
Once connected the Paho client uses three threads.  One for send, one receive and one for call backs.   In future there is an intent to use non blocking io and reduce the number of threads.  That will require a change the minimum level of Java that is supported, moving up from todays minimum of Java 1.4.2 (and JME CLDC)


All the best
Dave

--
--
To learn more about MQTT please visit
http://mqtt.org

To post to this group, send email to mq...@googlegroups.com
To unsubscribe from this group, send email to
mqtt+uns...@googlegroups.com

For more options, visit this group at

http://groups.google.com/group/mqtt

---
You received this message because you are subscribed to the Google Groups "MQ Telemetry Transport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Reply all
Reply to author
Forward
0 new messages