public class KafkaRpcClientFactory extends Object implements RpcClientFactory
The client also expands the buffer into chunks if it is larger than the configured buffer size. The client then sends the request to Kafka. If it is directed RPC (to a specific minion) it sends the request to all partitions there by to all consumers (minions).
Consumer thread (one for each module) will receive the response and send it to a response handler which will return the response.
Timeout tracker thread will fetch the response handler from it's delay queue and send a timeout response if it is not finished already.
JMX_DOMAIN_RPC, LOG_PREFIX, RPC_COUNT, RPC_DURATION, RPC_FAILED, RPC_REQUEST_SIZE, RPC_RESPONSE_SIZE
Constructor and Description |
---|
KafkaRpcClientFactory() |
Modifier and Type | Method and Description |
---|---|
<S extends RpcRequest,T extends RpcResponse> |
getClient(RpcModule<S,T> module) |
com.codahale.metrics.MetricRegistry |
getMetrics() |
TracerRegistry |
getTracerRegistry() |
void |
setLocation(String location) |
void |
setMetrics(com.codahale.metrics.MetricRegistry metrics) |
void |
setTracerRegistry(TracerRegistry tracerRegistry) |
void |
start() |
void |
stop() |
public <S extends RpcRequest,T extends RpcResponse> RpcClient<S,T> getClient(RpcModule<S,T> module)
getClient
in interface RpcClientFactory
public void setLocation(String location)
public void setTracerRegistry(TracerRegistry tracerRegistry)
public TracerRegistry getTracerRegistry()
public com.codahale.metrics.MetricRegistry getMetrics()
public void setMetrics(com.codahale.metrics.MetricRegistry metrics)
public void start()
public void stop()
Copyright © 2020. All rights reserved.