davsclaus commented on code in PR #30984:
URL: https://github.com/apache/camel/pull/30984#discussion_r4721962815
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -12297,6 +12297,18 @@ With `allowUrlBody=true`, a body that does not start
with `version: 1` and is no
with a space or a relative name, now fails with an `InvalidPayloadException`,
as a URL with an unknown scheme already
did. Before, it failed with an `IllegalArgumentException`. A URL that cannot
be fetched keeps its own exception.
+=== camel-weather - the consumer polls once an hour, and weatherApi Hourly and
Daily query the forecast
+
+A `weather` consumer without a `delay` option now polls once an hour, as its
documentation says. The default delay of
+the scheduled poll consumer (500 milliseconds) replaced the one hour default
before, so the consumer called
+OpenWeatherMap twice a second. Set `delay` to keep a shorter interval.
+
+`weatherApi=Hourly` and `weatherApi=Daily` without `period` now query the
hourly or the daily forecast, with the length
Review Comment:
Added in 9f85dcb8: the entry now says the daily forecast
(`/data/2.5/forecast/daily`) needs a paid OpenWeatherMap subscription, so with
a free API key `weatherApi=Daily` fails with HTTP 401, and to use
`weatherApi=Hourly` or leave `weatherApi` unset.
_Claude Code on behalf of Claus Ibsen_
##########
components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherEndpoint.java:
##########
@@ -93,12 +99,47 @@ public WeatherQuery getWeatherQuery() {
return this.weatherQuery;
}
+ /**
+ * Milliseconds before the next poll.
+ */
+ @Override
+ public void setDelay(long delay) {
+ super.setDelay(delay);
+ this.delay = delay;
Review Comment:
The field is used: it carries the `@UriParam` metadata (default one hour)
for the docs, the catalog and the DSL, and `setDelay` keeps it in sync with
`super.setDelay`, which the consumer reads. So no change here.
_Claude Code on behalf of Claus Ibsen_
--
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]