Return-Path:
+ This Processor polls Apache Kafka
+ for data using KafkaConsumer API available with Kafka 0.10.x. When a message is received
+ from Kafka, this Processor emits a FlowFile where the content of the FlowFile is the value
+ of the Kafka message.
+
+ The Security Protocol property allows the user to specify the protocol for communicating
+ with the Kafka broker. The following sections describe each of the protocols in further detail.
+
+ This option provides an unsecured connection to the broker, with no client authentication and no encryption.
+ In order to use this option the broker must be configured with a listener of the form:
+ Description:
+ Security Configuration:
+ PLAINTEXT
+
+ PLAINTEXT://host.name:port
+
+
+ This option provides an encrypted connection to the broker, with optional client authentication. In order + to use this option the broker must be configured with a listener of the form: +
+ SSL://host.name:port ++ In addition, the processor must have an SSL Context Service selected. + +
+ If the broker specifies ssl.client.auth=none, or does not specify ssl.client.auth, then the client will + not be required to present a certificate. In this case, the SSL Context Service selected may specify only + a truststore containing the public key of the certificate authority used to sign the broker's key. +
++ If the broker specifies ssl.client.auth=required then the client will be required to present a certificate. + In this case, the SSL Context Service must also specify a keystore containing a client key, in addition to + a truststore as described above. +
++ This option uses SASL with a PLAINTEXT transport layer to authenticate to the broker. In order to use this + option the broker must be configured with a listener of the form: +
+ SASL_PLAINTEXT://host.name:port ++ In addition, the Kerberos Service Name must be specified in the processor. + +
+ If the SASL mechanism is GSSAPI, then the client must provide a JAAS configuration to authenticate. The + JAAS configuration can be provided by specifying the java.security.auth.login.config system property in + NiFi's bootstrap.conf, such as: +
+ java.arg.16=-Djava.security.auth.login.config=/path/to/kafka_client_jaas.conf ++ +
+ An example of the JAAS config file would be the following: +
+ KafkaClient { + com.sun.security.auth.module.Krb5LoginModule required + useKeyTab=true + storeKey=true + keyTab="/path/to/nifi.keytab" + serviceName="kafka" + principal="nifi@YOURREALM.COM"; + }; ++ NOTE: The serviceName in the JAAS file must match the Kerberos Service Name in the processor. + +
+ Alternatively, starting with Apache NiFi 1.2.0 which uses the Kafka 0.10.2 client, the JAAS + configuration when using GSSAPI can be provided by specifying the Kerberos Principal and Kerberos Keytab + directly in the processor properties. This will dynamically create a JAAS configuration like above, and + will take precedence over the java.security.auth.login.config system property. +
++ If the SASL mechanism is PLAIN, then client must provide a JAAS configuration to authenticate, but + the JAAS configuration must use Kafka's PlainLoginModule. An example of the JAAS config file would + be the following: +
+ KafkaClient { + org.apache.kafka.common.security.plain.PlainLoginModule required + username="nifi" + password="nifi-password"; + }; ++ +
+ NOTE: It is not recommended to use a SASL mechanism of PLAIN with SASL_PLAINTEXT, as it would transmit + the username and password unencrypted. +
++ NOTE: Using the PlainLoginModule will cause it be registered in the JVM's static list of Providers, making + it visible to components in other NARs that may access the providers. There is currently a known issue + where Kafka processors using the PlainLoginModule will cause HDFS processors with Keberos to no longer work. +
++ This option uses SASL with an SSL/TLS transport layer to authenticate to the broker. In order to use this + option the broker must be configured with a listener of the form: +
+ SASL_SSL://host.name:port ++ +
+ See the SASL_PLAINTEXT section for a description of how to provide the proper JAAS configuration + depending on the SASL mechanism (GSSAPI or PLAIN). +
++ See the SSL section for a description of how to configure the SSL Context Service based on the + ssl.client.auth property. +
+ + + Added: nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.ConsumeKafka_0_10/index.html URL: http://svn.apache.org/viewvc/nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.ConsumeKafka_0_10/index.html?rev=1811008&view=auto ============================================================================== --- nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.ConsumeKafka_0_10/index.html (added) +++ nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.ConsumeKafka_0_10/index.html Tue Oct 3 13:30:16 2017 @@ -0,0 +1 @@ +Consumes messages from Apache Kafka specifically built against the Kafka 0.10.x Consumer API. Please note there are cases where the publisher can get into an indefinite stuck state. We are closely monitoring how this evolves in the Kafka community and will take advantage of those fixes as soon as we can. In the meantime it is possible to enter states where the only resolution will be to restart the JVM NiFi runs on. The complementary NiFi processor for sending messages is PublishKafka_0_10.
Kafka, Get, Ingest, Ingress, Topic, PubSub, Consume, 0.10.x
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.
Name | Default Value | Allowable Values | Description |
---|---|---|---|
Kafka Brokers | localhost:9092 | A comma-separated list of known Kafka Brokers in the format <host>:<port> Supports Expression Language: true | |
Security Protocol | PLAINTEXT |
| Protocol used to communicate with brokers. Corresponds to Kafka's 'security.protocol' property. |
Kerberos Service Name | The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS config or in Kafka's config. Corresponds to Kafka's 'security.protocol' property.It is ignored unless one of the SASL options of the <Security Protocol> are selected. | ||
Kerberos Principal | The Kerberos principal that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be set into 'sasl.jaas.config' Kafka's property. | ||
Kerberos Keytab | The Kerberos keytab that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be set into 'sasl.jaas.config' Kafka's property. | ||
SSL Context Service | Controller Service API: SSLContextService Implementations: StandardSSLContextService StandardRestrictedSSLContextService | Specifies the SSL Context Service to use for communicating with Kafka. | |
Topic Name(s) | The name of the Kafka Topic(s) to pull from. More than one can be supplied if comma separated. Supports Expression Language: true | ||
Topic Name Format | names |
| Specifies whether the Topic(s) provided are a comma separated list of names or a single regular expression |
Group ID | A Group ID is used to identify consumers that are within the same consumer group. Corresponds to Kafka's 'group.id' property. | ||
Offset Reset | latest |
| Allows you to manage the condition when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted). Corresponds to Kafka's 'auto.offset.reset' property. |
Key Attribute Encoding | utf-8 |
| FlowFiles that are emitted have an attribute named 'kafka.key'. This property dictates how the value of the attribute should be encoded. |
Message Demarcator | Since KafkaConsumer receives messages in batches, you have an option to output FlowFiles which contains all Kafka messages in a single batch for a given topic and partition and this property allows you to provide a string (interpreted as UTF-8) to use for demarcating apart multiple Kafka messages. This is an optional property and if not provided each Kafka message received will result in a single FlowFile which time it is triggered. To enter special character such as 'new line'
use CTRL+Enter or Shift+Enter depending on the OS Supports Expression Language: true | ||
Max Poll Records | 10000 | Specifies the maximum number of records Kafka should return in a single poll. | |
Max Uncommitted Time | 1 secs | Specifies the maximum amount of time allowed to pass before offsets must be committed. This value impacts how often offsets will be committed. Committing offsets less often increases throughput but also increases the window of potential data duplication in the event of a rebalance or JVM restart between commits. This value is also related to maximum poll records and the use of a message demarcator. When using a message demarcator we can have far more uncommitted messages than when we're not as there is much less for us to keep track of in memory. |
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
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, its value will be ignored and WARN message logged. For the list of available Kafka properties please refer to: http://kafka.apache.org/documentation.html#configuration. |
Name | Description |
---|---|
success | FlowFiles received from Kafka. Depending on demarcation strategy it is a flow file per message or a bundle of messages grouped by topic and partition. |
Name | Description |
---|---|
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.partition | The partition of the topic the message or message bundle is from |
kafka.topic | The topic the message or message bundle is from |
+ This Processor puts the contents of a FlowFile to a Topic in + Apache Kafka using KafkaProducer API available + with Kafka 0.10.x API. The contents of the incoming FlowFile will be read using the + configured Record Reader. Each record will then be serialized using the configured + Record Writer, and this serialized form will be the content of a Kafka message. + This message is optionally assigned a key by using the <Kafka Key> Property. +
++ The Security Protocol property allows the user to specify the protocol for communicating + with the Kafka broker. The following sections describe each of the protocols in further detail. +
++ This option provides an unsecured connection to the broker, with no client authentication and no encryption. + In order to use this option the broker must be configured with a listener of the form: +
+ PLAINTEXT://host.name:port ++ +
+ This option provides an encrypted connection to the broker, with optional client authentication. In order + to use this option the broker must be configured with a listener of the form: +
+ SSL://host.name:port ++ In addition, the processor must have an SSL Context Service selected. + +
+ If the broker specifies ssl.client.auth=none, or does not specify ssl.client.auth, then the client will + not be required to present a certificate. In this case, the SSL Context Service selected may specify only + a truststore containing the public key of the certificate authority used to sign the broker's key. +
++ If the broker specifies ssl.client.auth=required then the client will be required to present a certificate. + In this case, the SSL Context Service must also specify a keystore containing a client key, in addition to + a truststore as described above. +
++ This option uses SASL with a PLAINTEXT transport layer to authenticate to the broker. In order to use this + option the broker must be configured with a listener of the form: +
+ SASL_PLAINTEXT://host.name:port ++ In addition, the Kerberos Service Name must be specified in the processor. + +
+ If the SASL mechanism is GSSAPI, then the client must provide a JAAS configuration to authenticate. The + JAAS configuration can be provided by specifying the java.security.auth.login.config system property in + NiFi's bootstrap.conf, such as: +
+ java.arg.16=-Djava.security.auth.login.config=/path/to/kafka_client_jaas.conf ++ +
+ An example of the JAAS config file would be the following: +
+ KafkaClient { + com.sun.security.auth.module.Krb5LoginModule required + useKeyTab=true + storeKey=true + keyTab="/path/to/nifi.keytab" + serviceName="kafka" + principal="nifi@YOURREALM.COM"; + }; ++ NOTE: The serviceName in the JAAS file must match the Kerberos Service Name in the processor. + +
+ Alternatively, starting with Apache NiFi 1.2.0 which uses the Kafka 0.10.2 client, the JAAS + configuration when using GSSAPI can be provided by specifying the Kerberos Principal and Kerberos Keytab + directly in the processor properties. This will dynamically create a JAAS configuration like above, and + will take precedence over the java.security.auth.login.config system property. +
++ If the SASL mechanism is PLAIN, then client must provide a JAAS configuration to authenticate, but + the JAAS configuration must use Kafka's PlainLoginModule. An example of the JAAS config file would + be the following: +
+ KafkaClient { + org.apache.kafka.common.security.plain.PlainLoginModule required + username="nifi" + password="nifi-password"; + }; ++ +
+ NOTE: It is not recommended to use a SASL mechanism of PLAIN with SASL_PLAINTEXT, as it would transmit + the username and password unencrypted. +
++ NOTE: Using the PlainLoginModule will cause it be registered in the JVM's static list of Providers, making + it visible to components in other NARs that may access the providers. There is currently a known issue + where Kafka processors using the PlainLoginModule will cause HDFS processors with Keberos to no longer work. +
++ This option uses SASL with an SSL/TLS transport layer to authenticate to the broker. In order to use this + option the broker must be configured with a listener of the form: +
+ SASL_SSL://host.name:port ++ +
+ See the SASL_PLAINTEXT section for a description of how to provide the proper JAAS configuration + depending on the SASL mechanism (GSSAPI or PLAIN). +
++ See the SSL section for a description of how to configure the SSL Context Service based on the + ssl.client.auth property. +
+ + Added: nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafkaRecord_0_10/index.html URL: http://svn.apache.org/viewvc/nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafkaRecord_0_10/index.html?rev=1811008&view=auto ============================================================================== --- nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafkaRecord_0_10/index.html (added) +++ nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafkaRecord_0_10/index.html Tue Oct 3 13:30:16 2017 @@ -0,0 +1 @@ +Sends the contents of a FlowFile as individual records to Apache Kafka using the Kafka 0.10.x Producer API. The contents of the FlowFile are expected to be record-oriented data that can be read by the configured Record Reader. Please note there are cases where the publisher can get into an indefinite stuck state. We are closely monitoring how this evolves in the Kafka community and will take advantage of those fixes as soon as we can. In the meantime it is possible to enter states where the only resolution will be to restart the JVM NiFi runs on. The complementary NiFi processor for fetching messages is ConsumeKafka_0_10_Record.
Apache, Kafka, Record, csv, json, avro, logs, Put, Send, Message, PubSub, 0.10.x
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.
Name | Default Value | Allowable Values | Description |
---|---|---|---|
Kafka Brokers | localhost:9092 | A comma-separated list of known Kafka Brokers in the format <host>:<port> Supports Expression Languag e: true | |
Topic Name | The name of the Kafka Topic to publish to. Supports Expression Language: true | ||
Record Reader | Controller Service API: RecordReaderFactory Implementations: CSVReader GrokReader AvroReader JsonTreeReader JsonPathReader ScriptedReader | The Record Reader to use for incoming FlowFiles | |
Record Writer | Controller Service API: RecordSetWriterFactory Implementations: JsonRecordSetWriter FreeFormTextRecordSetWriter AvroRecordSetWriter ScriptedRecordSetWriter CSVRecordSetWriter | The Record Writer to use in order to serialize the data before sending to Kafka | |
Security Protocol | PLAINTEXT |
| Protocol used to communicate with brokers. Corresponds to Kafka's 'security.protocol' property. |
Kerberos Service Name | The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS config or in Kafka's config. Corresponds to Kafka's 'security.protocol' property.It is ignored unless one of the SASL options of the <Security Protocol> are selected. | ||
Kerberos Principal | The Kerberos principal that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be set into 'sasl.jaas.config' Kafka's property. | ||
Kerberos Keytab | The Kerberos keytab that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be set into 'sasl.jaas.config' Kafka's property. | ||
SSL Context Service | Controller Service API: SSLContextService Implementations: StandardSSLContextService StandardRestrictedSSLContextService | Specifies the SSL Context Service to use for communicating with Kafka. | |
Delivery Guarantee | 0 |
| Specifies the requirement for guaranteeing that a message is sent to Kafka. Corresponds to Kafka's 'acks' property. |
Message Key Field | The name of a field in the Input Records that should be used as the Key for the Kafka message. Supports Expression Language: true | ||
Max Request Size | 1 MB | The maximum size of a request in bytes. Corresponds to Kafka's 'max.request.size' property and defaults to 1 MB (1048576). | |
Acknowledgment Wait Time | 5 secs | After sending a message to Kafka, this indicates the amount of time that we are willing to wait for a response from Kafka. If Kafka does not acknowledge the message within this time period, the FlowFile will be routed to 'failure'. | |
Max Metadata Wait Time | 5 sec | The amount of time publisher will wait to obtain metadata or wait for the buffer to flush during the 'send' call before failing the entire 'send' call. Corresponds to Kafka's 'max.block.ms' property Supports Expression Language: true | |
Partitioner class | org.apache.kafka.cli ents.producer.internals.DefaultPartitioner |
| Specifies which class to use to compute a partition id for a message. Corresponds to Kafka's 'partitioner.class' property. |
Compression Type | none |
| This parameter allows you to specify the compression codec for all data generated by this producer. |
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
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, its value will be ignored and WARN message logged. For the list of available Kafka properties please refer to: http://kafka.apache.org/documentation.html#configuration. |
Name | Description |
---|---|
success | FlowFiles for which all content was sent to Kafka. |
failure | Any FlowFile that cannot be sent to Kafka will be routed to this Relationship |
Name | Description |
---|---|
msg.count | The number of messages that were sent to Kafka for this FlowFile. This attribute is added only to FlowFiles that are routed to success. |
PublishKafka_0_10, ConsumeKafka_0_10, ConsumeKafkaRecord_0_10
\ No newline at end of file Added: nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/additionalDetails.html URL: http://svn.apache.org/viewvc/nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/additionalDetails.html?rev=1811008&view=auto ============================================================================== --- nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/additionalDetails.html (added) +++ nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/additionalDetails.html Tue Oct 3 13:30:16 2017 @@ -0,0 +1,155 @@ + + + + + ++ This Processor puts the contents of a FlowFile to a Topic in + Apache Kafka using KafkaProducer API available + with Kafka 0.10.x API. The content of a FlowFile becomes the contents of a Kafka message. + This message is optionally assigned a key by using the <Kafka Key> Property. +
+ ++ The Processor allows the user to configure an optional Message Demarcator that + can be used to send many messages per FlowFile. For example, a \n could be used + to indicate that the contents of the FlowFile should be used to send one message + per line of text. It also supports multi-char demarcators (e.g., 'my custom demarcator'). + If the property is not set, the entire contents of the FlowFile + will be sent as a single message. When using the demarcator, if some messages are + successfully sent but other messages fail to send, the resulting FlowFile will be + considered a failed FlowFile and will have additional attributes to that effect. + One of such attributes is 'failed.last.idx' which indicates the index of the last message + that was successfully ACKed by Kafka. (if no demarcator is used the value of this index will be -1). + This will allow PublishKafka to only re-send un-ACKed messages on the next re-try. +
++ The Security Protocol property allows the user to specify the protocol for communicating + with the Kafka broker. The following sections describe each of the protocols in further detail. +
++ This option provides an unsecured connection to the broker, with no client authentication and no encryption. + In order to use this option the broker must be configured with a listener of the form: +
+ PLAINTEXT://host.name:port ++ +
+ This option provides an encrypted connection to the broker, with optional client authentication. In order + to use this option the broker must be configured with a listener of the form: +
+ SSL://host.name:port ++ In addition, the processor must have an SSL Context Service selected. + +
+ If the broker specifies ssl.client.auth=none, or does not specify ssl.client.auth, then the client will + not be required to present a certificate. In this case, the SSL Context Service selected may specify only + a truststore containing the public key of the certificate authority used to sign the broker's key. +
++ If the broker specifies ssl.client.auth=required then the client will be required to present a certificate. + In this case, the SSL Context Service must also specify a keystore containing a client key, in addition to + a truststore as described above. +
++ This option uses SASL with a PLAINTEXT transport layer to authenticate to the broker. In order to use this + option the broker must be configured with a listener of the form: +
+ SASL_PLAINTEXT://host.name:port ++ In addition, the Kerberos Service Name must be specified in the processor. + +
+ If the SASL mechanism is GSSAPI, then the client must provide a JAAS configuration to authenticate. The + JAAS configuration can be provided by specifying the java.security.auth.login.config system property in + NiFi's bootstrap.conf, such as: +
+ java.arg.16=-Djava.security.auth.login.config=/path/to/kafka_client_jaas.conf ++ +
+ An example of the JAAS config file would be the following: +
+ KafkaClient { + com.sun.security.auth.module.Krb5LoginModule required + useKeyTab=true + storeKey=true + keyTab="/path/to/nifi.keytab" + serviceName="kafka" + principal="nifi@YOURREALM.COM"; + }; ++ NOTE: The serviceName in the JAAS file must match the Kerberos Service Name in the processor. + +
+ Alternatively, starting with Apache NiFi 1.2.0 which uses the Kafka 0.10.2 client, the JAAS + configuration when using GSSAPI can be provided by specifying the Kerberos Principal and Kerberos Keytab + directly in the processor properties. This will dynamically create a JAAS configuration like above, and + will take precedence over the java.security.auth.login.config system property. +
++ If the SASL mechanism is PLAIN, then client must provide a JAAS configuration to authenticate, but + the JAAS configuration must use Kafka's PlainLoginModule. An example of the JAAS config file would + be the following: +
+ KafkaClient { + org.apache.kafka.common.security.plain.PlainLoginModule required + username="nifi" + password="nifi-password"; + }; ++ +
+ NOTE: It is not recommended to use a SASL mechanism of PLAIN with SASL_PLAINTEXT, as it would transmit + the username and password unencrypted. +
++ NOTE: Using the PlainLoginModule will cause it be registered in the JVM's static list of Providers, making + it visible to components in other NARs that may access the providers. There is currently a known issue + where Kafka processors using the PlainLoginModule will cause HDFS processors with Keberos to no longer work. +
++ This option uses SASL with an SSL/TLS transport layer to authenticate to the broker. In order to use this + option the broker must be configured with a listener of the form: +
+ SASL_SSL://host.name:port ++ +
+ See the SASL_PLAINTEXT section for a description of how to provide the proper JAAS configuration + depending on the SASL mechanism (GSSAPI or PLAIN). +
++ See the SSL section for a description of how to configure the SSL Context Service based on the + ssl.client.auth property. +
+ + Added: nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/index.html URL: http://svn.apache.org/viewvc/nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/index.html?rev=1811008&view=auto ============================================================================== --- nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/index.html (added) +++ nifi/site/trunk/docs/nifi-docs/components/org.apache.nifi/nifi-kafka-0-10-nar/1.4.0/org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10/index.html Tue Oct 3 13:30:16 2017 @@ -0,0 +1 @@ +Sends the contents of a FlowFile as a message to Apache Kafka using the Kafka 0.10.x Producer API.The messages to send may be individual FlowFiles or may be delimited, using a user-specified delimiter, such as a new-line. Please note there are cases where the publisher can get into an indefinite stuck state. We are closely monitoring how this evolves in the Kafka community and will take advantage of those fixes as soon as we can. In the meantime it is possible to enter states where the only resolution will be to restart the JVM NiFi runs on. Th e complementary NiFi processor for fetching messages is ConsumeKafka_0_10.
Apache, Kafka, Put, Send, Message, PubSub, 0.10.x
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.
Name | Default Value | Allowable Values | Description |
---|---|---|---|
Kafka Brokers | localhost:9092 | A comma-separated list of known Kafka Brokers in the format <host>:<port> Supports Expression Language: true | |
Sec urity Protocol | PLAINTEXT |
| Protocol used to communicate with brokers. Corresponds to Kafka's 'security.protocol' property. |
Kerberos Service Name | The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS config or in Kafka's config. Corresponds to Kafka's 'security.protocol' property.It is ignored unless one of the SASL options of the <Security Protocol> are selected. | ||
Kerberos Principal | The Kerberos principal that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be set into 'sasl.jaas.config' Kafka's property. | ||
Kerberos Keytab | The Kerberos keytab that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be set into 'sasl.jaas.config' Kafka's property. | ||
SSL Context Service | Controller Service API: SSLContextService Impl ementations: StandardSSLContextService StandardRestrictedSSLContextService | Specifies the SSL Context Service to use for communicating with Kafka. | |
Topic Name | The name of the Kafka Topic to publish to. Supports Expression Language: true | ||
Delivery Guarantee | 0 |
| Specifies the requirement for guaranteeing that a message is sent to Kafka. Corresponds to Kafka's 'acks' property. |
Kafka Key | The Key to use for the Message. If not specified, the flow file attribute 'kafka.key' is used as the message key, if it is present and we're not demarcating. Supports Expression Language: true | ||
Key Attribute Encoding | utf-8 |
| FlowFiles that are emitted have an attribute named 'kafka.key'. This property dictates how the value of the attribute should be encoded. |
Message Demarcator | Specifies the string (interpreted as UTF-8) to use for demarcating multiple messages within a single FlowFile. If not specified, the entire content of the FlowFile will be used as a single message. If specified, the contents of the FlowFile will be split on this delimiter and each section sent as a separate Kafka message. To en
ter special character such as 'new line' use CTRL+Enter or Shift+Enter, depending on your OS. Supports Expression Language: true | ||
Max Request Size | 1 MB | The maximum size of a request in bytes. Corresponds to Kafka's 'max.request.size' property and defaults to 1 MB (1048576). | |
Acknowledgment Wait Time | 5 secs | After sending a message to Kafka, this indicates the amount of time that we are willing to wait for a response from Kafka. If Kafka does not acknowledge the message within this time period, the FlowFile will be routed to 'failure'. | |
Max Metadata Wait Time | 5 sec | The amount of time publisher
will wait to obtain metadata or wait for the buffer to flush during the 'send' call before failing the entire 'send' call. Corresponds to Kafka's 'max.block.ms' property Supports Expression Language: true | |
Partitioner class | org.apache.kafka.clients.producer.internals.DefaultPartitioner |
| Specifies which class to use to compute a partition id for a message. Corresponds to Kafka's 'partitioner.class' property. |
Compression Type | none |
| This parameter allows you to specify the compression codec for all data generated by this producer. |
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
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 dyn amic property represents a property that was already set, its value will be ignored and WARN message logged. For the list of available Kafka properties please refer to: http://kafka.apache.org/documentation.html#configuration. |
Name | Description |
---|---|
success | FlowFiles for which all content was sent to Kafka. |
failure | Any FlowFile that cannot be sent to Kafka will be routed to this Relationship |
Name | Description |
---|---|
msg.count | The number of messages that were sent to Kafka for this FlowFile. This attribute is added only to FlowFiles that are routed to success. If the <Message Demarcator> Property is not set, this will always be 1, but if the Property is set, it may be greater than 1. |
Consumes messages from Apache Kafka specifically built against the Kafka 0.11.x Consumer API. The complementary NiFi processor for sending messages is PublishKafkaRecord_0_11. Please note that, at this time, the Processor assumes that all records that are retrieved from a given partition have the same schema. 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.
Kafka, Get, Record, csv, avro, json, Ingest, Ingress, Topic, PubSub, Consume, 0.11.x
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.
Name | Default Value | Allowable Values | Description |
---|---|---|---|
Kafka Brokers | localhost:9092 | A comma-separated list of known Kafka Brokers in the format <host>:<port> Supports Expression Language: true | |
Topic Name(s) | The name of the Kafka Topic(s) to pull from. More than one can be supplied if comma separated. Supports Expression Language: true | ||
Topic Name Format | names |
| Specifies whether the Topic(s) provided are a comma separated list of names or a single regular expression |
Record Reader | Controller Service API: RecordReaderFactory Implementations: CSVReader GrokReader AvroReader JsonTreeReader JsonPathReader ScriptedReader | The Record Reader to use for incoming FlowFiles | |
Record Writer | Controller Service API: RecordSetWriterFactory Implementations: JsonRecordSetWriter FreeFormTextRecordSetWriter AvroR ecordSetWriter ScriptedRecordSetWriter CSVRecordSetWriter | The Record Writer to use in order to serialize the data before sending to Kafka | |
Honor Transactions | true |
| Specifies whether or not NiFi should honor transactional guarantees when communicating with Kafka. If false, the Processor will use an "isolation level" of read_uncomitted. This means that messages will be received as soon as they are written to Kafka but will be pulled, even if the producer cancels the transactions. If this value is true, NiFi will not receive any messages for which the producer's tr ansaction was canceled, but this can result in some latency since the consumer must wait for the producer to finish its entire transaction instead of pulling as the messages become available. |
Security Protocol | PLAINTEXT |
| Protocol used to communicate with brokers. Corresponds to Kafka's 'security.protocol' property. |
Kerberos Service Name | The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS config or in Kafka's config. Corresponds to Kafka's 'security.protocol' property.It is ignored unless one of the SASL options of the <Security Protocol> are selected. | ||
Kerberos Principal | The Kerberos principal that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be set into 'sasl.jaas.config' Kafka's property. | ||
Kerberos Keytab | The Kerberos keytab that will be used to connect to brokers. If not set, it is expected to set a JAAS configuration file in the JVM properties defined in the bootstrap.conf file. This principal will be s et into 'sasl.jaas.config' Kafka's property. | ||
SSL Context Service | Controller Service API: SSLContextService Implementations: StandardSSLContextService StandardRestrictedSSLContextService | Specifies the SSL Context Service to use for communicating with Kafka. | |
Group ID | A Group ID is used to identify consumers that are within the same consumer group. Corresponds to Kafka's 'group.id' property. | ||
Offset Reset | latest |
| Allows you to manage the condition when there is no initial offset in Kafka or if the current offset does not exist any more on the server (e.g. because that data has been deleted). Corresponds to Kafka's 'auto.offset.reset' property. |
Message He ader Encoding | UTF-8 | Any message header that is found on a Kafka message will be added to the outbound FlowFile as an attribute. This property indicates the Character Encoding to use for deserializing the headers. | |
Headers to Add as Attributes (Regex) | A Regular Expression that is matched against all message headers. Any message header whose name matches the regex will be added to the FlowFile as an Attribute. If not specified, no Header values will be added as FlowFile attributes. If two messages have a different value for the same header and that header is selected by the provided regex, then those two messages must be added to different FlowFiles. As a result, users should be cautious about using a regex like ".*" if messages are expected to have header values that are unique per message, suc h as an identifier or timestamp, because it will prevent NiFi from bundling the messages together efficiently. | ||
Max Poll Records | 10000 | Specifies the maximum number of records Kafka should return in a single poll. | |
Max Uncommitted Time | 1 secs | Specifies the maximum amount of time allowed to pass before offsets must be committed. This value impacts how often offsets will be committed. Committing offsets less often increases throughput but also increases the window of potential data duplication in the event of a rebalance or JVM restart between commits. This value is also related to maximum poll records and the use of a message demarcator. When using a message demarcator we can have far more uncommitted messages than when we're not as there is much less for us to keep t rack of in memory. |
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
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, its value will be ignored and WARN message logged. For the list of available Kafka properties please refer to: http://kafka.apache.org/documentation.html#configuration. |
Name | Description |
---|---|
success | FlowFiles received from Kafka. Depending on demarcation strategy it is a flow file per message or a bundle of messages group ed by topic and partition. |
parse.failure | If a message from Kafka cannot be parsed using the configured Record Reader, the contents of the message will be routed to this Relationship as its own individual FlowFile. |
Name | Description |
---|---|
record.count | The number of records received |
mime.type | The MIME Type that is provided by the configured Record Writer |
kafka.partition | The partition of the topic the records are from |
kafka.topic | The topic records are from |
ConsumeKafka_0_11, PublishKafka_0_11, PublishKafkaRecord_0_11
\ No newline at end of file