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.