ListenGRPC

Description:

Starts a gRPC server and listens on the given port to transform the incoming messages into FlowFiles. The message format can be a pre-defined standard FlowFile data structure (attributes and content) provided by NiFi or user defined message types and services can also be used. gRPC isn't intended to carry large payloads, so this processor should be used only when the message sizes are on the order of megabytes. The default maximum message size is 4MB.

Tags:

ingest, grpc, rpc, listen

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Local gRPC Service PortLocal gRPC service portThe local port that the gRPC service will listen on.
Use TLSUse TLSfalse
  • true
  • false
Whether or not to use TLS to receive the contents of the gRPC messages.
SSL Context ServiceSSL Context ServiceController Service API:
RestrictedSSLContextService
Implementation: StandardRestrictedSSLContextService
The SSL Context Service used to provide server certificate information for TLS (https) connections. Keystore must be configured on the service. If truststore is also configured, it will turn on and require client certificate authentication (Mutual TLS).

This Property is only considered if the [Use TLS] Property has a value of "true".
Authorized DN PatternAuthorized DN Pattern.*A Regular Expression to apply against the Distinguished Name of incoming connections. If the Pattern does not match the DN, the connection will be refused. The property will only be used if client certificate authentication (Mutual TLS) has been configured on SSL Context Service, otherwise it will be ignored.

This Property is only considered if the [Use TLS] Property has a value of "true".
Flow Control WindowFlow Control Window1MBThe initial HTTP/2 flow control window for both new streams and overall connection. Flow-control schemes ensure that streams on the same connection do not destructively interfere with each other. The default is 1MB.
Maximum Message SizeMax Message Size4MBThe maximum size of FlowFiles that this processor will allow to be received. The default is 4MB. If FlowFiles exceed this size, you should consider using another transport mechanism as gRPC isn't designed for heavy payloads.
Service Typeservice-typeFlowFile Ingest Service
  • FlowFile Ingest Service Pre-defined service for ingesting standard FlowFiles (simple message type with attributes and content)
  • Custom Ingest Service User defined service(s) with custom .proto file(s)
Pre-defined FlowFile ingest service or user defined custom services. In case of 'Custom Ingest Service', multiple services with multiple methods can be used. Each method will be handled as a data ingestion procedure and the request object will be converted to FlowFile content and/or FlowFile attributes. The response object will be null.
Proto Directoryproto-directoryDirectory containing Protocol Buffers message and service definition (.proto) file(s).
Supports Expression Language: true (will be evaluated using variable registry only)

This Property is only considered if the [Service Type] Property has a value of "Custom Ingest Service".
Output Fieldoutput-fieldField of the request message to output as the FlowFile content (e.g. customer.name). If not specified, the whole request message will be converted to JSON and will be set in the FlowFile content. If empty string specified, no FlowFile content will be set. The latter can be used when message fields are extracted to FlowFile attributes instead of content (see dynamic properties).
Supports Expression Language: true (will be evaluated using variable registry only)

This Property is only considered if the [Service Type] Property has a value of "Custom Ingest Service".

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
request$<FIELD.PATH>FlowFile attribute nameThe property name specifies the field in the request message whose value will be added as a FlowFile attribute with the name specified in the property's value (e.g. request$customer.name => customerName).
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successThe request message was received successfully.

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
listengrpc.remote.user.dnThe DN of the user who sent the FlowFile to this NiFi
listengrpc.remote.hostThe IP of the client who sent the FlowFile to this NiFi

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component does not allow an incoming relationship.

System Resource Considerations:

None specified.