# Kafka Connection Properties

## `brokers` (array, required)

The host names of the Kafka brokers

The object is an array with all elements of the type `string`.

Examples: `["kafka1:9092","kafka2:9092"]`, `["kafka1:9092","kafka2:9092","kafka3:9092"]`

## `clientType` (string, enum)

Configure the connection to be a producer for a consumer. Defaults to producer.

This element must be one of the following enum values:

* `producer`
* `consumer`

Default: `"producer"`

## `groupId` (string)

Only for consumer clients: The group id for the Kafka consumer. It defaults to the id of the Connection resource.

## `clientId` (string)

The client id used when connecting to the broker

Default: `"protocol-mapper-kafka"`

Example: `"connectware_13462"`

## `connectionTimeout` (integer)

Time in milliseconds to wait for a successful connection

Default: `1000`

## `requestTimeout` (integer)

Time in milliseconds to wait for a successful request

Default: `10000`

## `trustAllCertificates` (boolean)

If true, all broker certificates will be accepted, regardless of whether they can be validated or not. Use this option if self-signed server certificates should be accepted, or if there are other reasons which prevent this client to validate the certificates.

Default: `false`

Examples: `true`, `false`

## `mutualAuthentication` (boolean)

If true, a full certificate chain including client certificate is expected to connect properly with validated certificates.

Default: `false`

Examples: `true`, `false`

## `caCert` (string)

The root CA certificate as Base64 encoded PEM file content

## `clientCert` (string)

The device certificate as Base64 encoded PEM CRT file content

## `clientPrivateKey` (string)

The device private key as Base64 encoded PEM CRT file content

## `sasl` (object)

SASL stands for Simple Authentication and Security Layer. With this property you can configure the authentification scheme to be used when contacting the Kafka broker.

Properties of the `sasl` object:

#### `mechanism` (string, enum, required)

The strategy used to carry on authentification

This element must be one of the following enum values:

* `plain`
* `scram-sha-256`
* `scram-sha-512`

#### `username` (string, required)

The username used in the authentification procedure

#### `password` (string, required)

The password used in the authentification procedure


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cybus.io/connectors/enterprise-connectors/kafka/kafkaconnection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
