smongiar opened a new pull request, #26988:
URL: https://github.com/apache/camel/pull/26988

   ## Summary
   
   Kafka 4.0 introduced the `by_duration:<ISO8601>` auto offset reset strategy 
([KAFKA-18013](https://issues.apache.org/jira/browse/KAFKA-18013)), which seeks 
the consumer to the offset recorded 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` works functionally on any build backed by `kafka-clients` 4.x 
(available since Camel 4.19 via 
[CAMEL-23086](https://issues.apache.org/jira/browse/CAMEL-23086)). The only gap 
was that `by_duration` was not listed in the `@UriParam(enums=...)` annotation, 
so it was invisible to generated documentation, IDE tooling, and the Camel 
catalog.
   
   ## Changes
   
   - `KafkaConfiguration.java`: add `by_duration` to `@UriParam(enums=...)` on 
`autoOffsetReset`; extend setter Javadoc to describe the value and note the 
Kafka 4.0 requirement
   - `kafka.json`: update the catalog descriptor accordingly (both 
component-level property and endpoint-level parameter entries)
   
   ## Testing
   
   No functional change — `autoOffsetReset` is passed through to the Kafka 
client as-is. The existing Kafka integration tests cover the consumer 
lifecycle; no new test is needed for a metadata-only addition.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to