Class MinionGrpcClient

  • All Implemented Interfaces:
    MessageDispatcherFactory

    public class MinionGrpcClient
    extends AbstractMessageDispatcherFactory<String>
    Minion GRPC client runs both RPC/Sink together. gRPC runs in a typical web server/client mode, so gRPC client runs on each minion and gRPC server runs on OpenNMS. Minion GRPC Client tries to get two stubs/streams (RPC/Sink) from OpenNMS server when it is in active state. It also initializes RPC observer/handler to receive requests from OpenNMS.

    RPC : RPC runs in bi-directional streaming mode. Minion gets each request and it handles each request in a separate thread. Once the request is executed, the response sender call is synchronized as writing to observer is not thread-safe. Minion also sends it's headers (SystemId/location) to OpenNMS whenever the stub is initialized.

    Sink: Sink runs in uni-directional streaming mode. If the sink module is async and OpenNMS Server is not active, the messages are buffered and blocked till minion is able to connect to OpenNMS.