void onSuccess(ClientResponse resp, RequestFuture<Void> future)
FindCoordinatorResponseHandler
FindCoordinatorResponseHandler is a concrete RequestFutureAdapter of ClientResponse.
FindCoordinatorResponseHandler is used exclusively when AbstractCoordinator is requested to discover the coordinator for a consumer group (and when successful sets the group coordinator as a Kafka node with the hostname and the port).
Performing Response Conversion on Success — onSuccess Method
|
Note
|
onSuccess is part of the RequestFutureAdapter Contract to perform a type conversion when a RequestFuture completes with a success.
|
onSuccess prints out the following DEBUG message to the logs:
Received FindCoordinator response [resp]
onSuccess takes the FindCoordinatorResponse (from the given ClientResponse) and branches off per error.
No Error
With no error, onSuccess sets the group coordinator (as a Kafka node with the hostname and the port).
onSuccess prints out the following INFO message to the logs:
Discovered group coordinator [coordinator]
onSuccess requests the ConsumerNetworkClient to initiate a connection to the group coordinator.
In the end, onSuccess requests the Heartbeat to resetSessionTimeout and completes the given RequestFuture<Void>.
Performing Response Conversion on Failure — onFailure Method
void onFailure(RuntimeException e, RequestFuture<Void> future)
|
Note
|
onFailure is part of the RequestFutureAdapter Contract to perform a type conversion when a RequestFuture completes with a failure.
|
onFailure…FIXME