emqx 消费消息时,大数量下消息丢失异常

emqx设置


报错日志
2024-10-15T17:18:29.434085+08:00 [error] supervisor: {esockd_connection_sup,<0.1778348.0>}, errorContext: connection_shutdown, reason: #{max => 1000,reason => mailbox_overflow,value => 5754}, offender: [{pid,<0.1778348.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{listener => {tcp,default},limiter => #{connection => #{initial => 0,rate => infinity,burst => 0}},enable_authn => true,zone => default}]}}]
2024-10-15T17:18:34.642190+08:00 [error] supervisor: {esockd_connection_sup,<0.1866307.0>}, errorContext: connection_shutdown, reason: #{max => 1000,reason => mailbox_overflow,value => 1050}, offender: [{pid,<0.1866307.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{listener => {tcp,default},limiter => #{connection => #{initial => 0,rate => infinity,burst => 0}},enable_authn => true,zone => default}]}}]
2024-10-15T17:18:38.625000+08:00 [error] supervisor: {esockd_connection_sup,<0.1871873.0>}, errorContext: connection_shutdown, reason: #{max => 1000,reason => mailbox_overflow,value => 7163}, offender: [{pid,<0.1871873.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{listener => {tcp,default},limiter => #{connection => #{initial => 0,rate => infinity,burst => 0}},enable_authn => true,zone => default}]}}]
2024-10-15T17:18:44.382242+08:00 [error] supervisor: {esockd_connection_sup,<0.1932267.0>}, errorContext: connection_shutdown, reason: #{max => 1000,reason => mailbox_overflow,value => 1215}, offender: [{pid,<0.1932267.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{listener => {tcp,default},limiter => #{connection => #{initial => 0,rate => infinity,burst => 0}},enable_authn => true,zone => default}]}}]
2024-10-15T17:18:48.045386+08:00 [error] supervisor: {esockd_connection_sup,<0.1957107.0>}, errorContext: connection_shutdown, reason: #{max => 1000,reason => mailbox_overflow,value => 1050}, offender: [{pid,<0.1957107.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{listener => {tcp,default},limiter => #{connection => #{initial => 0,rate => infinity,burst => 0}},enable_authn => true,zone => default}]}}]

mailbox_overflow, 可能是的订阅者处理不过来了,或者是网络带宽受限。

这里有一篇文章介绍如何规避订阅者的瓶颈问题:
https://segmentfault.com/a/1190000045059752