ConvertProtobuf

Description:

Converts a Protocol Buffers message from binary format. The content of the output FlowFile can be the whole message converted to JSON or a field of the message. Individual message fields can also be converted to FlowFile attributes.

Tags:

protobuf

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
Proto Directoryproto-directoryDirectory containing Protocol Buffers message definition (.proto) file(s).
Supports Expression Language: true (will be evaluated using variable registry only)
Message Typemessage-typeFully qualified name of the Protocol Buffers message type including its package (eg. mypackage.MyMessage). Please note it is the message type name from the .proto file, not the name of the generated Java class. The .proto files configured in 'Proto Directory' must contain the definition of this message type.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Output Fieldoutput-fieldField of the message to output as the FlowFile content (e.g. customer.name). If not specified, the whole 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 flow file attributes and variable registry)

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

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

NameValueDescription
message$<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. message$customer.name => customerName).
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successProtocol Buffers message converted successfully.
failureProtocol Buffers message failed to be converted.

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.