Package org.opennms.core.ipc.rpc.kafka
Class KafkaRpcServerManager
- java.lang.Object
-
- org.opennms.core.ipc.rpc.kafka.KafkaRpcServerManager
-
public class KafkaRpcServerManager extends java.lang.ObjectThis 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 voidbind(RpcModule module)voiddestroy()KafkaTopicProvidergetKafkaRpcTopicProvider()voidinit()protected voidstartConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)protected voidstopConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)voidunbind(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 java.io.IOException- Throws:
java.io.IOException
-
bind
public void bind(RpcModule module) throws java.lang.Exception
- Throws:
java.lang.Exception
-
startConsumerForModule
protected void startConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)
-
stopConsumerForModule
protected void stopConsumerForModule(RpcModule<RpcRequest,RpcResponse> rpcModule)
-
unbind
public void unbind(RpcModule module) throws java.lang.Exception
- Throws:
java.lang.Exception
-
destroy
public void destroy()
-
getKafkaRpcTopicProvider
public KafkaTopicProvider getKafkaRpcTopicProvider()
-
-