Claus Ibsen created CAMEL-27842:
-----------------------------------
Summary: camel-atom: the default poll delay is 500 ms instead of
60 s, the idempotent strategy ignores the time zone offset
Key: CAMEL-27842
URL: https://issues.apache.org/jira/browse/CAMEL-27842
Project: Camel
Issue Type: Bug
Components: camel-atom
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-atom for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31143).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. The default poll delay is 500 ms
{{FeedEndpoint.createConsumer}} calls setDelay(60000) and then
configureConsumer(answer); ScheduledPollEndpoint.doConfigureConsumer sets the
delay to DEFAULT_DELAY (500 ms) because the endpoint delay is -1. A test shows
getDelay() = 500 for both consumer types, while the doc page says the feed is
polled every 60 seconds by default.
Proposed change: override getDefaultDelay() (and have doConfigureConsumer use
it), or set the endpoint delay to 60000 when it is not set.
h4. 2. The default idempotent strategy ignores the time zone offset
{{ItemUpdatedIdempotentStrategy}} compares dates parsed by AtomConverter.toDate
(SimpleDateFormat yyyy-MM-dd'T'HH:mm:ss), which drops the offset and reads the
time in the JVM zone. An entry updated 2024-01-01T09:30:00-01:00 (newer) after
one updated 2024-01-01T10:00:00Z is skipped for good (reproduced). RFC 822 and
date-only values do not parse, so those entries are routed on every poll.
Proposed change: compare the ZonedDateTime of the library (updated, else
published).
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)