Description:

Sends FlowFiles, optionally with content, to a configurable remote gRPC service endpoint. The remote gRPC service must abide by the service IDL defined in NiFi. gRPC isn’t intended to carry large payloads, so this processor should be used only when FlowFile sizes are on the order of megabytes. The default maximum message size is 4MB.

Tags:

grpc, rpc, client

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.

Name

Default Value

Allowable Values

Description

Remote gRPC service hostname

Remote host which will be connected to

Remote gRPC service port

Remote port which will be connected to
Max Message Size 4MB The 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.
Use SSL/TLS false true
false
If to use SSL/TLS to send the contents of the gRPC messages.
SSL Context Service

Controller Service API: 


SSLContextService

Implementations:


StandardSSLContextService
StandardRestrictedSSLContextService
The SSL Context Service used to provide client certificate information for TLS/SSL (https) connections.
Send FlowFile Content true true
false
If to include the FlowFile content in the FlowFileRequest to the gRPC service.
Always Output Response false True
false
Will force a response FlowFile to be generated and routed to the 'Response' relationship regardless of what the server status code received is or if the processor is configured to put the server response body in the request attribute. In the later configuration a request FlowFile with the response body in the attribute and a typical response FlowFile will be emitted to their respective relationships.
Penalize on "No Retry" false true
false
Enabling this property will penalize FlowFiles that are routed to the "No Retry" relationship.

Relationships:

Name

Description

Original The original FlowFile will be routed upon success. It will have new attributes detailing the success of the request.
Failure The original FlowFile will be routed on any type of connection failure, timeout or general exception. It will have new attributes detailing the request.
Retry The original FlowFile will be routed on any status code that can be retried. It will have new attributes detailing the request.
No Retry The original FlowFile will be routed on any status code that should NOT be retried. It will have new attributes detailing the request.
Response A Response FlowFile will be routed upon success. If the 'Output Response Regardless' property is true then the response will be sent to this relationship regardless of the status code received.

Reads Attributes:

None specified.

Writes Attributes:

Name

Description

invokegrpc.response.code The response code that is returned (0 = ERROR, 1 = SUCCESS, 2 = RETRY)
invokegrpc.response.body The response message that is returned
invokegrpc.service.host The remote gRPC service hostname
invokegrpc.service.port The remote gRPC service port
invokegrpc.java.exception.class The Java exception class raised when the processor fails
invokegrpc.java.exception.message The Java exception message raised when the processor fails

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.