Skip to content

KafkaClient

KafkaClient is an interface to NetworkClient.

Contract

inFlightRequestCount

int inFlightRequestCount()
int inFlightRequestCount(
  String nodeId)

Used when:

  • ConsumerNetworkClient is requested to pendingRequestCount and poll
  • Sender is requested to run
  • SenderMetrics is requested for requests-in-flight performance metric

leastLoadedNode

Node leastLoadedNode(
  long now)

Used when:

newClientRequest

ClientRequest newClientRequest(
  String nodeId,
  AbstractRequest.Builder<?> requestBuilder,
  long createdTimeMs,
  boolean expectResponse)
ClientRequest newClientRequest(
  String nodeId,
  AbstractRequest.Builder<?> requestBuilder,
  long createdTimeMs,
  boolean expectResponse,
  int requestTimeoutMs,
  RequestCompletionHandler callback)

Used when:

poll

List<ClientResponse> poll(
  long timeout,
  long now)

Used when:

  • FIXME

pollDelayMs

long pollDelayMs(
  Node node,
  long now)

Used when:

  • FIXME

Is Node Ready and Connected

boolean ready(
  Node node,
  long now);

Used when:

send

void send(
  ClientRequest request,
  long now)

Used when:

  • FIXME

wakeup

void wakeup()

Used when:

  • FIXME

Implementations

Closeable

KafkaClient is a Closeable (Java).