Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Max. messages processed per seconds

Hi Ian,

thank you so much for your advise; you caught it!! My Mosquitto config is the problem. I have changed the max_queued_messages option to an unusual very large value and then I've received all the expected messages. No drops. So, I'm almost sure that it is a matter of configuring max_inflight_messages and max_queued_messages to fit my specific needs.

Also, I will subscribe to:

$SYS/broker/messages/inflight
$SYS/broker/publish/messages/dropped


to monitor how things evolve.

I need to understand better the effects of tuning these two configuration parameters before being able to have an reasonable configuration but I feel I'm now in the good way. After my latest test (thanks to you) I have found that (it could be of somebody's interest):

- Having a large max_inflight_messages value floods the PAHO subscriber as it is not able to process the receiving message and has to persist message acknowledgements to disk, making the client very slow and the time of service veeeeery large. But, it allow the broker to have a lower max_queued_messages value and use less resources. 

- On the contrary,  having a low max_inflight_messages value makes possible for the client to process the messages correctly and be more fluent, as it is able to acknowledge messages without need of persist ACKs to disk. But to avoid message drops, it needs that the broker has a greater max_queued_messages value, that implies more resurces comsumption. 

So, I need to find a balance of these two parameters. 

I really appreciate your help Ian. I was becoming mad.

Kindest regards.


2015-02-26 10:29 GMT+01:00 Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx>:
Hi Manuel,

I couldn't give you the receiving limit of that client, it depends so much on the hardware and other environmental configurations.

What I can tell you is that QoS 2 messages should not be lost.  If the client can't process messages quickly enough then they should queue up on the server side.  Have you checked Mosquitto for any log messages?  Can you monitor the number of messages queued at the Mosquitto end for your client, to see whether that is rising?  Mosquitto does have a maximum number of messages queued for any client, so we want to make sure you're not hitting that - if you are, I would expect some messages in the log.

For further debugging, options are:

1) Mosquitto trace of MQTT packets sent/received
2) Java client trace (although that is highly detailed, probably too much)
3) the Paho test repository has a trace "proxy" which sits in between client and server and prints out the packets sent and received.  Caveats: it won't necessarily run fast enough, doesn't support SSL.  run_proxy.py starts it.

Ian



On 02/25/2015 07:37 PM, Manuel Domínguez Dorado wrote:
Hi guys,

could anybody tell me the aproximate message receiving limit of paho java asynchronous client? I'm developing a backend and use only one asynchronous client to receive messages of all application users. I would like to know the average message rate that this asynchronous client is able to receive, based on your experiences.

In this way I can decide whether to use one client to subscribe all needed topics or some clients to subscribe some topic each one of them (anyway... it his a good practice?).

Best regards.

PS: I'm loosing some QoS2 messages when receiving at 1 ms each 50 milliseconds and don't know the cause (the NIC configuration, Mosquitto broker configuration/limits, user side limits -MQTT.js-, PAHO client limits...). So, I would like to discard potential source of failures.

--
---
Manuel Domínguez Dorado
ingeniero ARROBA ManoloDominguez PUNTO com
http://www.ManoloDominguez.com


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev



--
---
Manuel Domínguez Dorado
ingeniero ARROBA ManoloDominguez PUNTO com
http://www.ManoloDominguez.com

Back to the top