Class KafkaRpcClientFactory

  • All Implemented Interfaces:
    RpcClientFactory

    public class KafkaRpcClientFactory
    extends Object
    implements RpcClientFactory
    This Client Factory runs on OpenNMS. Whenever a Client receives an RPC request, it generates a unique rpcId and initiates a response handler unique to the rpcId. It also starts a consumer thread for the specific RPC module if it doesn't exist yet.

    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.

    • Constructor Detail

      • KafkaRpcClientFactory

        public KafkaRpcClientFactory()
    • Method Detail

      • setLocation

        public void setLocation​(String location)
      • setTracerRegistry

        public void setTracerRegistry​(TracerRegistry tracerRegistry)
      • getMetrics

        public com.codahale.metrics.MetricRegistry getMetrics()
      • setMetrics

        public void setMetrics​(com.codahale.metrics.MetricRegistry metrics)
      • start

        public void start()
      • stop

        public void stop()