tigase单个连接消息量限制配置(三)

tigase的每个连接消息量限制配置

现象:

一个客户端一次循环发送了10000多条;tigase会断线,断线一段时间后,客户端自动重连;

每个连接限制值:

tigase.server.ConnectionManager里有很多限制值,跟其中有2个限制值有关;

last_minute_packets_limit:一分钟消息数限制

total_packets_limit:总数限制,默认是0,不限制

last_minute_bin_limit:每分钟字节数限制,内容长度超限;默认20000000L bytes;

##超限处理: packet数超限:

第一种丢弃包,不做其他处理;

第二种丢弃包,断开连接;(默认)

字节数超限:

丢弃包,断开连接;

##修改配置: --cm-traffic-throttling = xmpp:2500:0:disc,bin:20m:0:disc

xmpp:报文;2500个每分钟,超了关连接或者drop丢弃 bin:报文总大小(bytes),20m每分钟,超了关连接,或者drop丢弃

Default value: 
xmpp:2500:0:disc,bin:20m:0:disc
Example: 
--cm-traffic-throttling = xmpp:2500:0:disc,bin:20m:0:disc
Possible values: 
comma separated list of traffic limits settings
Description: 
The property allows you to limit traffic on user connections. These limits are applied to each user connection and if a limit is exceeded then a specified action is applied.
The property value is a comma separated list of traffic limits settings. For example the first part: xmpp:2500:0:disc specifies traffic limits for XMPP data to 2,500 packets allowed within last minute either sent to or received from a user and unlimited (0) total traffic on the user connection, in case any limit is exceeded the action is to disconnect the user.
[xmpp|bin] traffic type, xmpp - XMPP traffic, that is limits refer to a number of XMPP packets transmitted, bin - binary traffic, that is limits refer to a number of bytes transmitted.
2500 maximum traffic allowed within 1 minute. 0 means unlimited, or no limits.
0 maximum traffic allowed for the life span of the connection. 0 means unlimited or no limits.
[disc|drop] action performed on the connection if limits are exceeded. disc - means disconnect, drop - means drop data.
posted @ 2021-04-26 10:43  venblenJan°  阅读(219)  评论(0编辑  收藏  举报