gnodet-bot commented on code in PR #30984:
URL: https://github.com/apache/camel/pull/30984#discussion_r4721513000
##########
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:
⚠️ **Compatibility note missing:** `weatherApi=Daily` now calls
`/data/2.5/forecast/daily`, which requires a **paid** OpenWeatherMap
subscription. Free-tier users who had `weatherApi=Daily` set (previously
getting current weather for free) will now get HTTP 401 errors after upgrading.
Consider adding a note here about the subscription requirement.
##########
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:
💡 `this.delay = delay` — is this field ever **read** downstream? The parent
class `DefaultPollingEndpoint` already stores the delay value. If the local
`delay` field is only needed for the `@UriParam` annotation metadata, the field
assignment here appears to be dead code. The annotation itself can live on the
field without the field value being used at runtime.
--
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]