With qos=1, messages block at the publisher when the frequency exceeds the bandwidth

34 views
Skip to first unread message

董允治

unread,
Oct 13, 2022, 1:05:23 AM10/13/22
to MQTT
Hi all,

I'm doing some stress testing on mqtt. I used the mosquitto service and python's paho-mqtt.
The experimental environment is: 2 computers with ubuntu(one as publisher , the other as subscriber and broker) 
qos = 1
frequency = 10 msg/s for every publisher and msg size = 1MB
Bandwidth = 100M/s
For publisher I use while loop and time sleep to make it send msg continuously. 
And I start about 50 publishers. After running 10 publishers on the publisher's computer, the bandwidth size is reached and the broker can no longer accept messages, at which point my publisher continues to store messages instead of hanging or queuing up to send them, causing the computer's memory usage to rise to 100%. 
I don't know if this is a config issue or if I should add some interrupts to the code.
Looking forward to your comments and replies.
Best regards!

Thomas

unread,
Oct 28, 2022, 4:50:53 AM10/28/22
to MQTT
Hi,

I would say this is working as designed. You can't send more message then physically possible. So you either back-off or don't try and and exceed the available bandwidth.

Thomas

Greg Troxel

unread,
Oct 28, 2022, 8:35:38 AM10/28/22
to Thomas, MQTT

Thomas <th.van...@gmail.com> writes:

> Hi,
>
> I would say this is working as designed. You can't send more message then
> physically possible. So you either back-off or don't try and and exceed the
> available bandwidth.

Agreed. And if your MQTT message rate exceeds wired ethernet, you are
doing something wrong to start with.
signature.asc
Reply all
Reply to author
Forward
0 new messages