# tKafkaOutput properties for Apache Spark Structured Streaming

[Preview](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Introduction/feature-preview-program-overview.htm)

Use these properties to configure tKafkaOutput running in the Spark Structured Streaming Job framework.

The Spark Structured Streaming tKafkaOutput 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 |
| --- | --- |
| Configuration component | Select the tKafkaConfiguration component to use for the Kafka connection settings. |
| Topic name | Enter the name of the topic you want to publish messages to. This topic must already<br>exist. |
| Partition | Enter the partition number to be used from the topic.<br><br>Information noteNote: If you leave this field blank, Kafka selects the partition according to its producer partitioning behavior. If you enter a value greater than 0, the component verifies that the Kafka topic has a partition range that includes the specified value. |
| Key | Enter the message key to assign to the Kafka records.<br><br>Information noteNote: If you leave this field blank, the key defaults to null. |
| Compress the data | Select the Compress the data check box to compress the<br>output data. |
| Set checkpoint location | Enter the path to the directory where Spark stores the checkpoint data for<br>this streaming query.<br><br>Checkpointing enables fault tolerance and allows a failed query to resume<br>from where it stopped. |
| Set trigger | Select this check box to configure how often the streaming query<br>processes data. The available trigger types are:<br><br><ul> <li><span>Continuous</span>: processes data continuously.</li> <li><span>Available now</span>: processes all available data in a                        single batch, then stops the query.</li> <li><span>Fixed interval</span>: runs the query at a fixed time                        interval. Enter the interval duration in the field that appears.</li> </ul> |
| Output mode | Select the output mode from the drop-down list:<br><br><ul> <li><span>Append</span>: adds new rows without modifying existing                        rows.</li> <li><span>Update</span>: writes only the rows that were updated                        since the last trigger.</li> </ul> |

## Advanced settings

| Properties | Description |
| --- | --- |
| Kafka properties | Add the Kafka new producer properties you need to customize to this table.<br><br>For more information about the new producer properties you can define in this<br>table, see the section describing the [new producer configuration](https://kafka.apache.org/documentation.html#newproducerconfigs) from the official Kafka<br>documentation. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is used as an end component and requires an input link.<br><br>This component, along with the Spark Structured Streaming component Palette it belongs to,<br>appears only when you are creating a Spark Structured 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. |
| Spark Connection | You need to use the Structured Streaming Configuration<br>tab in the Run view to define the connection to a Spark cluster for<br>the whole Job.<br><br>This connection is effective on a per-Job basis. |