mochi-mqtt / server

The fully compliant, embeddable high-performance Go MQTT v5 server for IoT, smarthome, and pubsub
MIT License
1.29k stars 222 forks source link

add description for MaximumClientWritesPending #411

Closed CendealChen closed 3 months ago

CendealChen commented 5 months ago

pls see ref MaximumClientWritesPending建议添加文档说明其意义及影响 #410

thedevop commented 4 months ago

You may also want to point it out that setting this value very low may result in lost messages for subscribers, especially for busy topics. One can monitor the metrics MessagesDropped when that occurred.

I do agree the current default is biased towards not dropping messages, perhaps 128 may be sufficient, which translates to a fixed memory cost of 1KB per connection. That makes it smaller than ClientNetReadBufferSize and ClientNetWriteBufferSize, both at 2KB.

mochi-co commented 3 months ago

Always happy to have more extensive documentation, thank you @CendealChen