From 84fbd91498870ce448f78aca33306e699c681d95 Mon Sep 17 00:00:00 2001 From: Nelson Parente Date: Wed, 17 Jun 2026 18:30:12 +0200 Subject: [PATCH] docs(kafka): document Kafka client timeout, health, and producer config metadata OSS-1152: document the new metadata fields added to the shared Kafka client for connection timeouts (dialTimeout, readTimeout, writeTimeout, metadataTimeout), producer tunability (producerRequiredAcks, producerRetryMax), and the associated Ping() health-check method. Updates both the pub/sub reference doc (setup-apache-kafka.md) and the bindings reference doc (kafka.md) with defaults, examples, and descriptions consistent with the implementation. Signed-off-by: Nelson Parente --- .../components-reference/supported-bindings/kafka.md | 6 ++++++ .../supported-pubsub/setup-apache-kafka.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md index b4d9f759129..6357a366813 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md @@ -107,6 +107,12 @@ spec: | `heartbeatInterval` | N | Input | The interval between heartbeats to the consumer coordinator. At most, the value should be set to a 1/3 of the `sessionTimeout` value. Defaults to `"3s"`. | `"5s"` | | `sessionTimeout` | N | Input | The timeout used to detect client failures when using Kafka’s group management facility. If the broker fails to receive any heartbeats from the consumer before the expiration of this session timeout, then the consumer is removed and initiates a rebalance. Defaults to `"10s"`. | `"20s"` | | `escapeHeaders` | N | Input | Enables URL escaping of the message header values received by the consumer. Allows receiving content with special characters that are usually not allowed in HTTP headers. Default is `false`. | `true` | +| `dialTimeout` | N | Input/Output | The maximum duration to wait for the initial TCP connection to a broker. Bounds how long `Init()` can block on an unreachable cluster. Default is `"30s"`. | `"10s"` | +| `readTimeout` | N | Input/Output | The maximum duration to wait for a response from a broker. Default is `"30s"`. | `"10s"` | +| `writeTimeout` | N | Input/Output | The maximum duration to wait for a request to be transmitted to a broker. Default is `"30s"`. | `"10s"` | +| `metadataTimeout` | N | Input/Output | The per-request timeout for metadata refresh operations. When `"0"` (default), Sarama computes the effective timeout from the Net timeouts and retry count. | `"5s"` | +| `producerRequiredAcks` | N | Output | The number of broker acknowledgements required before a produce request is considered successful. Accepted values: `"all"` (all in-sync replicas, highest durability), `"local"` (partition leader only), `"none"` (no acknowledgement). Default is `"all"`. | `"local"` | +| `producerRetryMax` | N | Output | The maximum number of times to retry sending a message before giving up. Default is `5`. | `3` | #### Note The metadata `version` must be set to `1.0.0` when using Azure EventHubs with Kafka. diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md index 8f8f744742b..4c32128b520 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md @@ -135,6 +135,12 @@ spec: | consumerGroupRebalanceStrategy | N | The strategy to use for consumer group rebalancing. Supported values: `range`, `sticky`, `roundrobin`. Default is `range` | `"sticky"` | | escapeHeaders | N | Enables URL escaping of the message header values received by the consumer. Allows receiving content with special characters that are usually not allowed in HTTP headers. Default is `false`. | `true` | | excludeHeaderMetaRegex | N | A regular expression to exclude keys from being converted from headers to metadata when consuming messages and from metadata to headers when publishing messages. This capability avoids unwanted downstream side effects for topic consumers. | '"^valueSchemaType$"` +| dialTimeout | N | The maximum duration to wait for the initial TCP connection to a broker. Bounds how long `Init()` can block on an unreachable cluster. Default is `"30s"` (matches Sarama's built-in default). | `"10s"` | +| readTimeout | N | The maximum duration to wait for a response from a broker after sending a request. Default is `"30s"`. | `"10s"` | +| writeTimeout | N | The maximum duration to wait for a request to be transmitted to a broker. Default is `"30s"`. | `"10s"` | +| metadataTimeout | N | The per-request timeout for metadata refresh operations. When `"0"` (default), Sarama computes the effective timeout from the Net timeouts and retry count. | `"5s"` | +| producerRequiredAcks | N | The number of broker acknowledgements required before a produce request is considered successful. Accepted values: `"all"` (all in-sync replicas, highest durability), `"local"` (partition leader only), `"none"` (no acknowledgement). Default is `"all"`. | `"local"` | +| producerRetryMax | N | The maximum number of times to retry sending a message before giving up. Default is `5`. | `3` | The `secretKeyRef` above is referencing a [kubernetes secrets store]({{% ref kubernetes-secret-store.md %}}) to access the tls information. Visit [here]({{% ref setup-secret-store.md %}}) to learn more about how to configure a secret store component.