You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Salvatore Mongiardo (Jira)" <ji...@apache.org> on 2026/09/28 10:45:00 UTC
[jira] [Created] (CAMEL-25091) camel-kafka: expose by_duration as valid autoOffsetReset value (Kafka 4.0+)
Salvatore Mongiardo created CAMEL-25091:
-------------------------------------------
Summary: camel-kafka: expose by_duration as valid autoOffsetReset value (Kafka 4.0+)
Key: CAMEL-25091
URL: https://issues.apache.org/jira/browse/CAMEL-25091
Project: Camel
Issue Type: Improvement
Components: camel-kafka
Reporter: Salvatore Mongiardo
Kafka 4.0 introduced the by_duration:<ISO-8601> auto offset reset strategy (KAFKA-18013), which seeks the consumer to the offset at (now - duration) when it starts. For example, by_duration:PT5M positions the consumer at the offset from 5 minutes before startup.
Camel already passes autoOffsetReset through to ConsumerConfig.AUTO_OFFSET_RESET_CONFIG without runtime validation, so by_duration:PT5M works on any build backed by kafka-clients 4.x (available since Camel 4.19 via CAMEL-23086). The only gap is documentation and tooling visibility:
- The @UriParam(enums=...) annotation on autoOffsetReset did not include by_duration, making the value invisible to the Camel catalog, IDE tooling, and camel validate.
- The existing description was stale: it referenced ZooKeeper and used "fail" instead of the correct value "none".
This improvement:
- Removes the enums constraint from autoOffsetReset (a bare "by_duration" entry would be invalid since the value is parameterised; keeping it as a free-form String lets by_duration:PT5M pass catalog validation)
- Rewrites the description to document all valid values including by_duration:<ISO-8601>
- Updates the catalog mirror, endpoint/component DSL factory javadocs
- Adds a unit test verifying by_duration:PT5M is passed through to ConsumerConfig.AUTO_OFFSET_RESET_CONFIG as-is
PR: https://github.com/apache/camel/pull/26988
--
This message was sent by Atlassian Jira
(v8.20.10#820010)