ConsumeKafka 2.0.0

Bundle
org.apache.nifi | nifi-kafka-nar
Description
Consumes messages from Apache Kafka Consumer API. The complementary NiFi processor for sending messages is PublishKafka. The Processor supports consumption of Kafka messages, optionally interpreted as NiFi records. Please note that, at this time (in read record mode), the Processor assumes that all records that are retrieved from a given partition have the same schema. For this mode, if any of the Kafka messages are pulled but cannot be parsed or written with the configured Record Reader or Record Writer, the contents of the message will be written to a separate FlowFile, and that FlowFile will be transferred to the 'parse.failure' relationship. Otherwise, each FlowFile is sent to the 'success' relationship and may contain many individual messages within the single FlowFile. A 'record.count' attribute is added to indicate how many messages are contained in the FlowFile. No two Kafka messages will be placed into the same FlowFile if they have different schemas, or if they have different values for a message header that is included by the <Headers to Add as Attributes> property.
Tags
Consume, Get, Ingest, Ingress, Kafka, PubSub, Record, Topic, avro, csv, json
Input Requirement
FORBIDDEN
Supports Sensitive Dynamic Properties
false
Properties
Relationships
Name Description
success FlowFiles containing one or more serialized Kafka Records
Writes Attributes
Name Description
record.count The number of records received
mime.type The MIME Type that is provided by the configured Record Writer
kafka.count The number of messages written if more than one
kafka.key The key of message if present and if single message. How the key is encoded depends on the value of the 'Key Attribute Encoding' property.
kafka.offset The offset of the message in the partition of the topic.
kafka.timestamp The timestamp of the message in the partition of the topic.
kafka.partition The partition of the topic the message or message bundle is from
kafka.topic The topic the message or message bundle is from
kafka.tombstone Set to true if the consumed message is a tombstone message
See Also