# tKafkaInputAvro (deprecated)

Availability-note[Deprecated](https://help.talend.com/r/en-US/Cloud/labels-on-talend-help-center/availability-deprecated)

This content is deprecated.

Transmits Avro-formatted messages you need to process to its following component in the Job you are designing.

Information noteDeprecation: Spark Streaming is deprecated beginning with the R2026-09 release. Use Spark Structured Streaming instead.

tKafkaInputAvro is a generic message broker that transmits messages in the AVRO format to the Job that runs transformations over these messages.This component cannot handle AVRO messages created by the avro-tools libraries.

This component is not shipped with your Talend Studio by default. You need to install it using the Feature Manager. For more information, see [Installing features using the Feature Manager](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/install-features-to-talend-studio).

## tKafkaInputAvro properties for Apache Spark Streaming

These properties are used to configure tKafkaInputAvro running in the Spark Streaming Job framework.

The Spark Streaming tKafkaInputAvro component belongs to the Messaging family.

This component is available in Talend Real-Time Big Data Platform and Talend Data Fabric.

Information noteImportant: For Spark Streaming Jobs, Talend Studio does not support a specific version of Kafka but relies on a Kafka broker version compatibility provided by Spark. The Kafka broker version supported depends on the Spark version you use. For each Spark version, Talend Studio supports the targeted Kafka broker version provided by Spark. As of today Talend Studio relies on Spark compatibility statement, and therefore supports Kafka broker version 0.10.0 onwards. For more information, see [Spark Streaming + Kafka Integration Guide](https://spark.apache.org/docs/latest/streaming-kafka-integration.html) on the official Spark documentation.

## Basic settings

| Properties | Description |
| --- | --- |
| Schema and Edit<br>schema | A schema is a row description. It defines the number of fields<br>(columns) to be processed and passed on to the next component. When you create a Spark<br>Job, avoid the reserved word line when naming the<br>fields. |
| Broker list | Enter the addresses of the broker nodes of the Kafka cluster to be used.<br><br>The form of this address should be *hostname:port*. This<br>information is the name and the port of the hosting node in this Kafka cluster.<br><br>If you need to specify several addresses, separate them using a comma (*,*). |
| Starting offset | Select the starting point from which the messages of a topic are consumed.<br><br>In Kafka, the sequential ID number of a message is called *offset*. From this list, you can select From<br>beginning to start consumption from the oldest message of the entire topic,<br>or select From latest to start from the latest message that<br>has been consumed by the same consumer group and of which the offset is tracked by Spark<br>within Spark checkpoints.<br><br>Note that in order to enable the component to remember the position of a consumed message,<br>you need to activate the Spark Streaming checkpointing in the Spark<br>Configuration tab in the Run view of the<br>Job.<br><br>Each consumer group has its own counter to remember the position of a message it has<br>consumed. For this reason, once a consumer group starts to consume messages of a given<br>topic, a consumer group recognizes the latest message only with regard to the position where<br>this group stops the consumption, rather than to the entire topic. Based on this principle,<br>the following behaviors can be expected:<br><br><ul> <li> <p>A topic has for example <em>100</em> messages. If a                consumer group has stopped the consumption at the message of the offset <em>50</em>, then when you select <span>From                    latest</span>, the same consumer group restarts from the offset <em>51</em>.</p> </li> <li> <p>If you create a new consumer group or reset an existing consumer group, which, in                either case, means this group has not consumed any message of this topic, then when                you start it from latest, this new group starts and waits for the offset <em>101</em>.</p> </li> </ul> |
| Topic name | Enter the name of the topic from which tKafkaInput<br>receives the feed of messages. |
| Group ID | Enter the name of the consumer group to which you want the current consumer (the tKafkaInput component) to belong.<br><br>This consumer group will be created at runtime if it does not exist at that moment.<br><br>This property is available only when you are using Spark 2.0 or the Hadoop distribution to<br>be used is running Spark 2.0. If you do not know the Spark version you are using, ask the<br>administrator of your cluster for details. |
| Set number of records per second to read from<br>each Kafka partition | Enter this number within double quotation marks to limit the size of each batch to be sent<br>for processing.<br><br>For example, if you put *100* and the batch value you<br>define in the Spark configuration tab is *2* seconds, the<br>size from a partition for each batch is *200*<br>messages.<br><br>If you leave this checkbox clear, the component tries to read all the available<br>messages in one second into one single batch before sending it, potentially resulting in Job<br>that stops responding in case of a huge quantity of messages. |
| Use SSL/TLS | Select this checkbox to enable the SSL or TLS encrypted connection.<br><br>Then you need to use the tSetKeystore<br>component in the same Job to specify the encryption information.<br><br>This property is available only when you are using Spark 2.0 or the Hadoop distribution to<br>be used is running Spark 2.0. If you do not know the Spark version you are using, ask the<br>administrator of your cluster for details.<br><br>The TrustStore file and any used KeyStore file must be stored locally on<br>every single Spark node that is hosting a Spark executor. |
| Use Kerberos authentication | If the Kafka cluster to be used is secured with Kerberos, select this<br>checkbox to display the related parameters to be defined:<br><br><ul> <li> <p> <span>JAAS configuration path</span>: enter the                        path, or browse to the JAAS configuration file to be used by the Job to                        authenticate as a client to Kafka.</p> <p>This JAAS file describes how the clients, the Kafka-related                        Jobs in terms of <em> <span>Talend</span> </em>, can connect to the Kafka broker nodes, using either the kinit mode or                        the keytab mode. The JAAS file must be stored in the machine where these                        Jobs are executed.</p> <p> <em> <span>Talend</span> </em>, Kerberos or Kafka does not provide this JAAS file. You need to create                        it by following the explanation in <a href="http://kafka.apache.org/documentation.html#security_sasl_clientconfig" target="_blank">Configuring Kafka                            client</a> depending on the security strategy of your                        organization.</p> </li> <li> <p> <span>Kafka brokers principal name</span>: enter                        the primary part of the Kerberos principal you defined for the brokers when                        you were creating the broker cluster. For example, in this principal <em>kafka/kafka1.hostname.com@EXAMPLE.COM</em>, the primary                        part to be used to fill in this field is <em>kafka</em>.</p> </li> <li> <p> <span>Set kinit command path</span>: Kerberos                        uses a default path to its kinit executable. If you have changed this path,                        select this checkbox and enter the custom access path.</p> <p>If you leave this checkbox clear, the default path is                        used.</p> </li> <li> <p> <span>Set Kerberos configuration path</span>:                        Kerberos uses a default path to its configuration file, the <em>krb5.conf</em> file (or <em>krb5.ini</em>                        in Windows) for Kerberos 5 for example. If you have changed this path,                        select this checkbox and enter the custom access path to the Kerberos                        configuration file.</p> <p>If you leave this checkbox clear, a given strategy is applied                        by Kerberos to attempt to find the configuration information it requires.                        For details about this strategy, see the <em>Locating the                            krb5.conf Configuration File</em> section in <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/jgss/tutorials/KerberosReq.html" target="_blank">Kerberos requirements</a>.</p> </li> </ul><br><br>For further information about how a Kafka cluster is secured with<br>Kerberos, see [Authenticating using<br>SASL](http://kafka.apache.org/documentation.html#security_sasl).<br><br>This check box is available since Kafka 0.9.0.1. |
| Use Schema Registry | Select this check box to use Confluent Schema Registry and to display the<br>related parameters to be defined:<br><br><ul> <li> <span>URL</span>: enter the Schema Registry instance URL.</li> <li> <span>Basic authentication</span>: select this check box and                           enter your credentials in the <span>Username</span> and                              <span>Password</span>.</li> <li> <span>Use the keystore of Kafka broker</span>: select this                           check box to enable the SSL or TLS encrypted connection using the same                           tSetKeystore component used by the Kafka broker. This checkbox is                           available when you select the <span>Use SSL/TLS</span> check                           box and clear the <span>Set schema registry                           keystore</span>.</li> <li> <span>Set schema registry keystore</span>: select this check                           box to enable the SSL or TLS encrypted connection. Then you need to use                           the <span>tSetKeystore</span> component in the same Job to                           specify the encryption information.</li> </ul><br><br>For more information about Schema Registry, see the [Confluent documentation](https://docs.confluent.io/platform/current/schema-registry/index.html).<br><br>This option is available when you have installed the 8.0.1-R2022-12 Talend Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Kafka properties | Add the Kafka consumer properties you need to customize to this table. For example, you<br>can set a specific *zookeeper.connection.timeout.ms* value<br>to avoid *ZkTimeoutException*.<br><br>For further information about the consumer properties you can define in this table, see<br>the section describing the consumer configuration in Kafka's documentation in http://kafka.apache.org/documentation.html#consumerconfigs. |
| Use hierarchical mode | Select this check box to map the binary (including hierarchical) Avro schema to the<br>flat schema defined in the schema editor of the current component. If the Avro<br>message to be processed is flat, leave this check box clear.<br><br>Once selecting it, you need set the following parameter(s):<br><br><ul> <li> <p> <span>Local path to the avro                    schema</span>: browse to the file which defines the                schema of the Avro data to be processed.</p> </li> <li> <p> <span>Mapping</span>: create the map                between the schema columns of the current component and the data stored                in the hierarchical Avro message to be handled. In the                <span>Node</span> column, you need to                enter the JSON path pointing to the data to be read from the                Avro message.</p> </li> </ul> |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is used as a start component and requires an output link.<br><br>This component, along with the Spark Streaming component Palette it belongs to, appears<br>only when you are creating a Spark Streaming Job.<br><br>Note that in this documentation, unless otherwise explicitly stated, a scenario presents<br>only Standard Jobs, that is to say traditional<br>Talend<br>data<br>integration Jobs.<br><br>In the implementation of the current component in Spark, the Kafka offsets are<br>automatically managed by Spark itself, that is to say, instead of being committed to ZooKeeper<br>or Kafka, the offsets are tracked within Spark checkpoints. For more information about this<br>implementation, see the [Direct approach](http://spark.apache.org/docs/latest/streaming-kafka-integration.html) section in the Spark documentation. |

**Related concepts**

* [Retrieving information from schema registry](https://help.qlik.com/talend/en-US/components/8.0/kafka/retrieving-information-from-schema-registry "This scenario explains how to retrieve flight information from schema registry using tKafkaInputAvro in your Spark Streaming Jobs.")