fix(shared): send to sub anyway
This commit is contained in:
parent
1a5293e4b4
commit
e175b3a1d6
|
@ -286,15 +286,17 @@ do_pick(Strategy, ClientId, SourceTopic, Group, Topic, FailedSubs) ->
|
||||||
%% Genuinely no subscriber
|
%% Genuinely no subscriber
|
||||||
false;
|
false;
|
||||||
[] ->
|
[] ->
|
||||||
%% All offline? pick one anyway
|
%% We try redispatch to subs who dropped the message because inflight was full.
|
||||||
%% We redispatch only to subs who dropped the message because inflight was full.
|
|
||||||
Found = maps_find_by(FailedSubs, fun({SubPid, FailReason}) ->
|
Found = maps_find_by(FailedSubs, fun({SubPid, FailReason}) ->
|
||||||
FailReason == dropped andalso is_alive_sub(SubPid)
|
FailReason == dropped andalso is_alive_sub(SubPid)
|
||||||
end),
|
end),
|
||||||
case Found of
|
case Found of
|
||||||
error -> false;
|
|
||||||
{ok, Dropped} ->
|
{ok, Dropped} ->
|
||||||
{retry, pick_subscriber(Group, Topic, Strategy, ClientId, SourceTopic, [Dropped])}
|
%% Found dropped client
|
||||||
|
{retry, pick_subscriber(Group, Topic, Strategy, ClientId, SourceTopic, [Dropped])};
|
||||||
|
error ->
|
||||||
|
%% All offline? pick one anyway
|
||||||
|
{retry, pick_subscriber(Group, Topic, Strategy, ClientId, SourceTopic, All)}
|
||||||
end;
|
end;
|
||||||
Subs ->
|
Subs ->
|
||||||
%% More than one available
|
%% More than one available
|
||||||
|
|
Loading…
Reference in New Issue