GetKafka

Description:

Fetches messages from Apache Kafka, specifically for 0.8.x versions. The complementary NiFi processor for sending messages is PutKafka.

Additional Details...

Tags:

Kafka, Apache, Get, Ingest, Ingress, Topic, PubSub, 0.8.x

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.

NameDefault ValueAllowable ValuesDescription
ZooKeeper Connection StringThe Connection String to use in order to connect to ZooKeeper. This is often a comma-separated list of <host>:<port> combinations. For example, host1:2181,host2:2181,host3:2188
Supports Expression Language: true
Topic NameThe Kafka Topic to pull messages from
Supports Expression Language: true
Zookeeper Commit Frequency60 secsSpecifies how often to communicate with ZooKeeper to indicate which messages have been pulled. A longer time period will result in better overall performance but can result in more data duplication if a NiFi node is lost
Batch Size1Specifies the maximum number of messages to combine into a single FlowFile. These messages will be concatenated together with the <Message Demarcator> string placed between the content of each message. If the messages from Kafka should not be concatenated together, leave this value at 1.
Message Demarcator\nSpecifies the characters to use in order to demarcate multiple messages from Kafka. If the <Batch Size> property is set to 1, this value is ignored. Otherwise, for each two subsequent messages in the batch, this value will be placed in between them.
Client NameNiFi-mock-processorClient Name to use when communicating with Kafka
Group IDmock-processorA Group ID is used to identify consumers that are within the same consumer group
Supports Expression Language: true
Kafka Communications Timeout30 secsThe amount of time to wait for a response from Kafka before determining that there is a communications error
ZooKeeper Communications Timeout30 secsThe amount of time to wait for a response from ZooKeeper before determining that there is a communications error
Auto Offset Resetlargest
  • smallest
  • largest
Automatically reset the offset to the smallest or largest offset available on the broker

Dynamic Properties:

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

NameValueDescription
The name of a Kafka configuration property.The value of a given Kafka configuration property.These properties will be added on the Kafka configuration after loading any provided configuration properties. In the event a dynamic property represents a property that was already set as part of the static properties, its value wil be overridden with warning message describing the override. For the list of available Kafka properties please refer to: http://kafka.apache.org/documentation.html#configuration.

Relationships:

NameDescription
successAll FlowFiles that are created are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
kafka.topicThe name of the Kafka Topic from which the message was received
kafka.keyThe key of the Kafka message, if it exists and batch size is 1. If the message does not have a key, or if the batch size is greater than 1, this attribute will not be added
kafka.partitionThe partition of the Kafka Topic from which the message was received. This attribute is added only if the batch size is 1
kafka.offsetThe offset of the message within the Kafka partition. This attribute is added only if the batch size is 1

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component does not allow an incoming relationship.