etzel-mes commented on code in PR #27908:
URL: https://github.com/apache/camel/pull/27908#discussion_r4287491213


##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConsumer.java:
##########
@@ -131,6 +131,15 @@ private void handleValueUpdate(final String node, final 
DataValue value) {
         }
     }
 
+    /**
+     * A null value with a Good status is the initial value at startup, which 
omitNullValues hides. A null value with a

Review Comment:
   Fixed in 23f226f00ad: the javadoc no longer mentions the startup value; it 
says that a data change with a Bad or Uncertain status is delivered even when 
its value is null.
   
   _Claude Code on behalf of etzel-mes_
   



##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java:
##########
@@ -91,7 +91,8 @@ public class MiloClientEndpoint extends DefaultEndpoint {
     private boolean defaultAwaitWrites;
 
     /**
-     * Omit notifications in case of null values
+     * Omit a data change whose value is null and whose status is Good, for 
example the initial value at startup. A data

Review Comment:
   Dropped the example in 23f226f00ad. The option now says only what it omits 
and that a Bad or Uncertain status is always delivered; the startup Bad status 
is described in the component doc and the upgrade note.
   
   _Claude Code on behalf of etzel-mes_
   



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -866,10 +866,14 @@ with `--include-input` for case/bulk requests that need 
captured input. Existing
 === camel-milo - creating and deleting the monitored items of a consumer
 
 Since 4.16, a `milo-client` consumer whose monitored item could not be 
created, for example because the node does not
-exist, received nothing. Now it receives one `DataValue` with the bad status 
code (when `omitNullValues=false`). The
+exist, received nothing. Now it receives one `DataValue` with the bad status 
code. The
 monitored item is created again when the route is restarted or when Camel 
rebuilds the connection to the server; unlike
 Camel 3.x, it is not retried every 10 seconds.
 
+A data change with a Bad or Uncertain status is now delivered by default, even 
when its value is null; previously the
+default `omitNullValues=true` dropped it, so the route did not learn that a 
node went bad. `omitNullValues` now only
+omits a data change whose value is null and whose status is Good, for example 
the initial value at startup.

Review Comment:
   Done in 23f226f00ad, in its own section before this one: a route may now 
receive a Bad status with a null value at startup and after a reconnect 
(`Bad_WaitingForInitialData`, or a `milo-server` item that was not written 
yet), checks `getStatusCode()` before it uses the value, and skips the startup 
status by filtering on its status code.
   
   _Claude Code on behalf of etzel-mes_
   



##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConsumer.java:
##########
@@ -131,6 +131,15 @@ private void handleValueUpdate(final String node, final 
DataValue value) {
         }
     }
 
+    /**
+     * A null value with a Good status is the initial value at startup, which 
omitNullValues hides. A null value with a
+     * Bad or Uncertain status carries the quality of the node and is 
delivered.

Review Comment:
   Kept as a guard, like the one in `mapToMessage`.
   
   _Claude Code on behalf of etzel-mes_
   



-- 
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