Merge pull request #10946 from fix/mqtt-bridge-no-warn-pool-size-1

fix(mqttconn): no warn if ingress poolsize is same as config
This commit is contained in:
Andrew Mayorov 2023-06-06 11:12:14 +03:00 committed by GitHub
commit 783f6933a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,7 @@ choose_ingress_pool_size(
{_Filter, #{share := _Name}} -> {_Filter, #{share := _Name}} ->
% NOTE: this is shared subscription, many workers may subscribe % NOTE: this is shared subscription, many workers may subscribe
PoolSize; PoolSize;
{_Filter, #{}} -> {_Filter, #{}} when PoolSize > 1 ->
% NOTE: this is regular subscription, only one worker should subscribe % NOTE: this is regular subscription, only one worker should subscribe
?SLOG(warning, #{ ?SLOG(warning, #{
msg => "mqtt_bridge_ingress_pool_size_ignored", msg => "mqtt_bridge_ingress_pool_size_ignored",
@ -110,6 +110,8 @@ choose_ingress_pool_size(
config_pool_size => PoolSize, config_pool_size => PoolSize,
pool_size => 1 pool_size => 1
}), }),
1;
{_Filter, #{}} when PoolSize == 1 ->
1 1
end. end.