> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/2-7-0/connectors/enterprise-connectors/kafka/kafkaendpoint.md).

# Kafka Endpoint Properties

## `topic` (string, required)

The name of the Kafka topic this endpoint operates on. For a `write` endpoint the topic is the destination of produced messages; for a `subscribe` endpoint it is the source of consumed messages. Each endpoint addresses exactly one topic. The topic must exist on the broker, unless automatic topic creation is enabled in the broker configuration.

Example: `"topic_name"`

## `acks` (number, enum)

**Only applies to `write` endpoints** (connections with `clientType: producer`). Controls when a message is considered successfully delivered, based on how many brokers must acknowledge it. The default (`-1`) provides the strongest durability guarantee and is recommended for production workloads. Lower values increase throughput and reduce latency at the cost of weaker delivery guarantees.

Available options:

* `-1` (default): All in-sync replicas must acknowledge the message. This provides the strongest durability guarantee and the highest latency.
* `1`: Only the partition leader must acknowledge. Higher throughput, but a message can be lost if the leader fails before the message is replicated to followers.
* `0`: Fire-and-forget. The broker sends no response at all, which gives the highest throughput and the lowest latency, but delivery failures cannot be detected or reported.

If a produce request fails with a retriable error, such as a connection error, the Kafka client retries it up to three times. Once those retries are exhausted, or if the error is not retriable at all, the connection is marked as disconnected and the error is both written to the log and published to the endpoint's `<topic>/res` topic. The message itself is only re-sent after reconnection if the endpoint has `buffering.enabled` set to `true`; otherwise it is lost. With `acks` set to `0` no broker response is expected, so delivery failures on the broker side go unnoticed and only client-side and connection errors are ever reported.

This element must be one of the following enum values:

* `-1`
* `0`
* `1`

Default: `-1`

## `timeout` (number)

**Only applies to `write` endpoints** (connections with `clientType: producer`). Time in milliseconds that the broker may spend waiting for the acknowledgements required by `acks` before it answers the produce request with an error. How long the client itself waits for that answer is bounded by the connection's `requestTimeout`, so with its default of 10000 ms the client gives up before this value is reached. This property has no effect when `acks` is set to `0`, because no response is awaited.

Default: `30000`

## `compression` (string, enum)

**Only applies to `write` endpoints** (connections with `clientType: producer`). The compression codec used by the producer to compress message batches before sending them to the broker. Compression reduces network bandwidth and broker storage usage at the cost of additional CPU usage on both producer and broker.

Available options:

* `None` (default): Messages are sent uncompressed.
* `GZIP`: Messages are compressed using GZIP.

This element must be one of the following enum values:

* `None`
* `GZIP`

Default: `"None"`

## `fromBeginning` (boolean)

**Only applies to `subscribe` endpoints** (connections with `clientType: consumer`). Controls where the consumer starts reading when no committed offset exists yet for its consumer group on this topic. If `true`, the consumer starts at the earliest available message in the topic; if `false`, it starts at the latest, so only messages produced after the subscription is established are received. Once the consumer group has committed offsets for the topic, consumption resumes from the last committed offset and this setting has no effect.

Default: `false`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cybus.io/2-7-0/connectors/enterprise-connectors/kafka/kafkaendpoint.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
