davsclaus commented on code in PR #27201:
URL: https://github.com/apache/camel/pull/27201#discussion_r4155220815
##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MonitorFilterConfiguration.java:
##########
@@ -32,7 +32,7 @@ public class MonitorFilterConfiguration implements Cloneable {
private MonitorFilterType monitorFilterType;
@UriParam(defaultValue = "0", description = "Deadband type for
MonitorFilterType DataChangeFilter.")
- private UInteger dataChangeFilterDeadbandType = UInteger.valueOf(0);
+ private Integer dataChangeFilterDeadbandType = Integer.valueOf(0);
Review Comment:
Changing `UInteger` to `Integer` makes sense, since there is no
String→`UInteger` converter. It does change the public getter/setter and the
generated endpoint-DSL method `dataChangeFilterDeadbandType(UInteger)`, so
please add a note to `camel-4x-upgrade-guide-4_23.adoc` and regenerate
`MiloClientEndpointBuilderFactory` in `dsl/camel-endpointdsl`.
##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java:
##########
@@ -66,6 +66,16 @@ public class MiloClientEndpoint extends DefaultEndpoint {
@UriParam(defaultValue = "0.0")
private Double samplingInterval = 0.0;
+ /**
+ * The queue size used for subscriptions
+ */
+ @UriParam(description = "queue size for subscription")
+ /**
+ * The queue size used for OPC UA subscriptions. If not set, the OPC UA
server default is used.
+ */
+ @UriParam(description = "Queue size for OPC UA subscriptions. If not set,
the server default is used.")
Review Comment:
This field now has two Javadoc blocks and two `@UriParam` annotations (lines
69-72 and 73-76): the suggestion was added instead of replacing the original.
`@UriParam` is not `@Repeatable`, so this is a compile error. Please keep a
single block, e.g.
```java
/**
* The queue size used for OPC UA subscriptions. If not set, a queue
size of 1 is requested.
*/
@UriParam
private Integer queueSize;
```
(With the Javadoc present the `description` attribute is redundant; the
tooling takes it from the Javadoc, as for the other fields in this class.)
##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/internal/SubscriptionManager.java:
##########
@@ -191,6 +197,13 @@ public void putSubscriptions(final Map<UInteger,
Subscription> subscriptions) th
} else {
final ReadValueId itemId = new ReadValueId(node,
AttributeId.Value.uid(), null, QualifiedName.NULL_VALUE);
final OpcUaMonitoredItem item = new
OpcUaMonitoredItem(itemId, MonitoringMode.Reporting);
+ if (null != s.getSamplingInterval()) {
+ item.setSamplingInterval(s.getSamplingInterval());
Review Comment:
Note for the upgrade guide: since 4.16 this value was never applied, so
milo's `OpcUaMonitoredItem` default of 1000 ms was used. With this change the
endpoint default `samplingInterval=0.0` (fastest practical rate) is sent again
for every consumer that doesn't set it. That matches the documented default and
the pre-4.16 behaviour, but users upgrading from 4.16-4.22 will see different
sampling and server load.
--
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]