Package org.opennms.core.ipc.rpc.kafka
Class KafkaRpcServerManager
- java.lang.Object
-
- org.opennms.core.ipc.rpc.kafka.KafkaRpcServerManager
-
public class KafkaRpcServerManager extends Object
This Manager runs on Minion, A consumer thread will be started on each RPC module which handles the request and executes it on rpc module and sends the response to Kafka. When the request is directed at specific minion (request with system-id), minion executes the request only if system-id matches with minionId.
-
-
Constructor Summary
Constructors Constructor Description KafkaRpcServerManager(KafkaConfigProvider configProvider, MinionIdentity minionIdentity, TracerRegistry tracerRegistry, com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(RpcModule module)
void
destroy()
KafkaTopicProvider
getKafkaRpcTopicProvider()
void
init()
protected void
startConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)
protected void
stopConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)
void
unbind(RpcModule module)
-
-
-
Constructor Detail
-
KafkaRpcServerManager
public KafkaRpcServerManager(KafkaConfigProvider configProvider, MinionIdentity minionIdentity, TracerRegistry tracerRegistry, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
init
public void init() throws IOException
- Throws:
IOException
-
startConsumerForModule
protected void startConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)
-
stopConsumerForModule
protected void stopConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)
-
destroy
public void destroy()
-
getKafkaRpcTopicProvider
public KafkaTopicProvider getKafkaRpcTopicProvider()
-
-