# tKafkaConfiguration 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)

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

The Spark Structured Streaming tKafkaConfiguration component belongs to the Messaging family.

The streaming version of this component is available in Talend Real-Time Big Data Platform and in Talend Data Fabric.

## Basic settings

| Properties | Description |
| --- | --- |
| 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 (*,*). |
| 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>Information noteRestriction: In the Preview version of Spark Structured Streaming,<br>SSL/TLS is not supported because the tSetKeystore component<br>is not implemented, even though the Use SSL/TLS check<br>box is displayed. |
| Use Schema Registry | Select this check box to use Confluent Schema Registry and configure<br>the following parameters:<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> fields.</li> <li> <span>Use the keystore of Kafka broker</span>: select this                        check box to enable SSL or TLS encryption using the same <span>tSetKeystore</span>                        component as the Kafka broker. This check box is available when you select                           <span>Use SSL/TLS</span> and clear <span>Set schema                           registry keystore</span>.</li> <li> <span>Set schema registry keystore</span>: select this check box to                        enable SSL or TLS encryption, then 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). |

## Advanced settings

| Properties | Description |
| --- | --- |
| Connection pool | In this area, you configure, for each Spark executor, the connection pool used to control<br>the number of connections that stay open simultaneously. The default values given to the<br>following connection pool parameters are good enough for most use cases.<br><br><ul> <li> <p> <span>Max total number of connections</span>: enter the maximum number            of connections (idle or active) that are allowed to stay open simultaneously.</p> <p>The default number is <em>8</em>. If you enter <em>-1</em>, you allow unlimited number of open connections at the same                time.</p> </li> <li> <p> <span>Max waiting time (ms)</span>: enter the maximum amount of time                    at the end of which the response to a demand for using a connection should be returned by                    the connection pool. By default, it is -1, that is to say, infinite.</p> </li> <li> <p> <span>Min number of idle connections</span>: enter the minimum number                        of idle connections (connections not used) maintained in the connection pool.</p> </li> <li> <p> <span>Max number of idle connections</span>: enter the maximum number                            of idle connections (connections not used) maintained in the connection pool.</p> </li> </ul><br><br>Information noteNote: You can configure the connection pool only if the Job contains one or more<br>tKafkaOutput components. |
| Evict connections | Select this check box to define criteria to destroy connections in the connection pool. The<br>following fields are displayed once you have selected it.<br><br><ul> <li> <p> <span>Time between two eviction runs</span>: enter the time interval                                    (in milliseconds) at the end of which the component checks the status of the connections and                                    destroys the idle ones.</p> </li> <li> <p> <span>Min idle time for a connection to be eligible to                                            eviction</span>: enter the time interval (in milliseconds) at the end of which the idle                                        connections are destroyed.</p> </li> <li> <p> <span>Soft min idle time for a connection to be eligible to                                                eviction</span>: this parameter works the same way as <span>Min idle                                                    time for a connection to be eligible to eviction</span> but it keeps the minimum number                                            of idle connections, the number you define in the <span>Min number of idle                                                connections</span> field.</p> </li> </ul> |

## Usage

| Usage guidance | Description |
| --- | --- |
| Usage rule | This component works standalone to create the Kafka connection that other Kafka<br>components in the Job can reuse.<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. |
| 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. |