This is an automated email from the ASF dual-hosted git repository.
popduke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/bifromq.git
The following commit(s) were added to refs/heads/main by this push:
new 15e1430ad chore: fix typo of EMA_ALPHA in MQTTSessionHandler (#209)
15e1430ad is described below
commit 15e1430ad8d4815c1c3803350db2b8e650595e21
Author: Zhangjian He <[email protected]>
AuthorDate: Wed Dec 17 23:21:31 2025 +0800
chore: fix typo of EMA_ALPHA in MQTTSessionHandler (#209)
Signed-off-by: Zhangjian He <[email protected]>
Co-authored-by: Yonny(Yu) Hao <[email protected]>
---
.../main/java/org/apache/bifromq/mqtt/handler/MQTTSessionHandler.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/bifromq-mqtt/bifromq-mqtt-server/src/main/java/org/apache/bifromq/mqtt/handler/MQTTSessionHandler.java
b/bifromq-mqtt/bifromq-mqtt-server/src/main/java/org/apache/bifromq/mqtt/handler/MQTTSessionHandler.java
index 02f3ece33..d15aee9cd 100644
---
a/bifromq-mqtt/bifromq-mqtt-server/src/main/java/org/apache/bifromq/mqtt/handler/MQTTSessionHandler.java
+++
b/bifromq-mqtt/bifromq-mqtt-server/src/main/java/org/apache/bifromq/mqtt/handler/MQTTSessionHandler.java
@@ -166,7 +166,7 @@ import org.apache.bifromq.util.UTF8Util;
@Slf4j
public abstract class MQTTSessionHandler extends MQTTMessageHandler implements
IMQTTSession {
protected static final boolean SANITY_CHECK =
SanityCheckMqttUtf8String.INSTANCE.get();
- private static final double EMA_APLHA = 0.15;
+ private static final double EMA_ALPHA = 0.15;
private static final int REDIRECT_CHECK_INTERVAL_SECONDS =
ClientRedirectCheckIntervalSeconds.INSTANCE.get();
protected final TenantSettings settings;
protected final String userSessionId;
@@ -370,7 +370,7 @@ public abstract class MQTTSessionHandler extends
MQTTMessageHandler implements I
ChannelAttrs.trafficShaper(ctx).setWriteLimit(settings.outboundBandwidth);
ChannelAttrs.trafficShaper(ctx).setMaxWriteSize(settings.outboundBandwidth);
ChannelAttrs.setMaxPayload(settings.maxPacketSize, ctx);
- receiveQuota = new AdaptiveReceiveQuota(settings.minSendPerSec,
clientReceiveMaximum(), EMA_APLHA);
+ receiveQuota = new AdaptiveReceiveQuota(settings.minSendPerSec,
clientReceiveMaximum(), EMA_ALPHA);
sessionCtx.localSessionRegistry.add(channelId(), this);
sessionRegistration =
ChannelAttrs.mqttSessionContext(ctx).sessionDictClient
.reg(clientInfo, (killer, redirection) -> {