Skip to content

siddhi-io-grpc

Jenkins Build Status GitHub (pre-)Release GitHub (Pre-)Release Date GitHub Open Issues GitHub Last Commit License

The siddhi-io-grpc extension is an extension to Siddhi that receives and publishes events via gRPC protocol, calls external services, and serves incoming requests and provide responses.

For information on Siddhi and it's features refer Siddhi Documentation.

Download

Latest API Docs

Latest API Docs is 1.0.12.

Features

  • grpc (Sink)

    gRPC sink publishes event data encoded into GRPC Classes as defined in the user input jar. This extension has a default gRPC service classes added. The default service is called EventService. This grpc sink is used for scenarios where we send a request and don't expect a response back(getting a google.protobuf.Empty response back). Please find the default protobuf definition here. Please find the custom protobuf definition that uses in examples here.

  • grpc-call (Sink)

    grpc-call sink publishes event data encoded into GRPC Classes as defined in the user input jar. This extension has a default gRPC service classes jar added. The default service is called EventService. This grpc-call sink is used for scenarios where we send a request out and expect a response back. In default mode this will use EventService process method. grpc-call-response source is used to receive the responses. A unique sink.id is used to correlate between the sink and its corresponding source.Please find the default protobuf definition here.Please find the custom protobuf definition that uses in examples here.

  • grpc-service-response (Sink)

    This extension is used to send responses back to a gRPC client after receiving requests through grpc-service source. This correlates with the particular source using a unique source.id

  • grpc (Source)

    This extension starts a grpc server during initialization time. The server listens to requests from grpc stubs. This source has a default mode of operation and custom user defined grpc service mode. By default this uses EventService. Please find the proto definition here. In the default mode this source will use EventService consume method. Please find the custom protobuf definition that uses in examples here. This method will receive requests and injects them into stream through a mapper.

  • grpc-call-response (Source)

    This grpc source receives responses received from gRPC server for requests sent from a grpc-call sink. The source will receive responses for sink with the same sink.id. For example if you have a gRPC sink with sink.id 15 then we need to set the sink.id as 15 in the source to receives responses. Sinks and sources have 1:1 mapping

  • grpc-service (Source)

    This extension implements a grpc server for receiving and responding to requests. During initialization time a grpc server is started on the user specified port exposing the required service as given in the url. This source also has a default mode and a user defined grpc service mode. By default this uses EventService. Please find the proto definition here In the default mode this will use the EventService process method. Please find the custom protobuf definition that uses in examples here. This accepts grpc message class Event as defined in the EventService proto. This uses grpc-service-response sink to send reponses back in the same Event message format.

Dependencies

Add following protobuf jar into {SIDDHI_HOME}/bundles * protobuf-java-3.9.1.jar

Installation

For installing this extension on various siddhi execution environments refer Siddhi documentation section on adding extensions.

Support and Contribution

  • We encourage users to ask questions and get support via StackOverflow, make sure to add the siddhi tag to the issue for better response.

  • If you find any issues related to the extension please report them on the issue tracker.

  • For production support and other contribution related information refer Siddhi Community documentation.