Merge pull request #9644 from id/fix-kafka-bridge-connectivity-detection
fix(kafka): detect connectivity in on_get_status
This commit is contained in:
commit
231d6da4dc
|
@ -81,7 +81,7 @@ t_create_success(_Config) ->
|
|||
receive
|
||||
{Ref, token_created} ->
|
||||
ok
|
||||
after 1_000 ->
|
||||
after 5_000 ->
|
||||
ct:fail(
|
||||
"should have confirmed token creation; msgs: ~0p",
|
||||
[process_info(self(), messages)]
|
||||
|
|
|
@ -173,8 +173,11 @@ on_kafka_ack(_Partition, _Offset, _Extra) ->
|
|||
%% Maybe need to bump some counters?
|
||||
ok.
|
||||
|
||||
on_get_status(_InstId, _State) ->
|
||||
connected.
|
||||
on_get_status(_InstId, #{client_id := ClientID}) ->
|
||||
case wolff:check_connectivity(ClientID) of
|
||||
ok -> connected;
|
||||
_ -> disconnected
|
||||
end.
|
||||
|
||||
%% Parse comma separated host:port list into a [{Host,Port}] list
|
||||
hosts(Hosts) ->
|
||||
|
|
Loading…
Reference in New Issue