feat: change message retry_interval default value to infinity
Previous Setting: The default value for `retry_interval` was 30 seconds. New Default: The default `retry_interval` has been changed to 'infinity'. With this update, EMQX will not automatically retry message deliveries by default. Compliance and Compatibility: Aligning with MQTT specification standards, in-session message delivery retries are not typically compliant. We recognize that some users depend on this feature, so the option to configure retries remains available for backward compatibility.
This commit is contained in:
parent
b232784df2
commit
20c92407c7
|
@ -3630,9 +3630,9 @@ mqtt_general() ->
|
||||||
)},
|
)},
|
||||||
{"retry_interval",
|
{"retry_interval",
|
||||||
sc(
|
sc(
|
||||||
duration(),
|
hoconsc:union([infinity, duration()]),
|
||||||
#{
|
#{
|
||||||
default => <<"30s">>,
|
default => infinity,
|
||||||
desc => ?DESC(mqtt_retry_interval)
|
desc => ?DESC(mqtt_retry_interval)
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
|
|
|
@ -602,9 +602,9 @@ handle_timeout(ClientInfo, expire_awaiting_rel, Session) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-spec retry(clientinfo(), session()) ->
|
-spec retry(clientinfo(), session()) ->
|
||||||
{ok, replies(), session()}.
|
{ok, replies(), session()} | {ok, replies(), timeout(), session()}.
|
||||||
retry(ClientInfo, Session = #session{inflight = Inflight}) ->
|
retry(ClientInfo, Session = #session{inflight = Inflight, retry_interval = Interval}) ->
|
||||||
case emqx_inflight:is_empty(Inflight) of
|
case emqx_inflight:is_empty(Inflight) orelse Interval =:= infinity of
|
||||||
true ->
|
true ->
|
||||||
{ok, [], Session};
|
{ok, [], Session};
|
||||||
false ->
|
false ->
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
Change `mqtt.retry_interval` config default to `infinity`.
|
||||||
|
|
||||||
|
Previously, the default value for `retry_interval` was 30 seconds.
|
||||||
|
|
||||||
|
The new default has been changed to 'infinity'. With this update, EMQX will not automatically retry message deliveries by default.
|
||||||
|
|
||||||
|
Aligning with MQTT specification standards, in-session message delivery retries are not typically compliant.
|
||||||
|
We recognize that some users depend on this feature, so the option to configure retries remains available for backward compatibility.
|
Loading…
Reference in New Issue