Hi Kevin,
I've setup a test case at:
https://github.com/hmarius/opcuatestsubscriptionConsider the following fragment:
-----------
BiConsumer<UaMonitoredItem, DataValue> consumer = (UaMonitoredItem u, DataValue d) -> {...}
ReadValueId readValueId1 = new ReadValueId(new NodeId(2, 10854),//DoubleValue
AttributeId.Value.uid(), null, QualifiedName.NULL_VALUE);
ReadValueId readValueId2 = new ReadValueId(new NodeId(2, 10846),//ByteValue
AttributeId.Value.uid(), null, QualifiedName.NULL_VALUE);
ReadValueId readValueId3 = new ReadValueId(new NodeId(2, 10849),//IntValue
AttributeId.Value.uid(), null, QualifiedName.NULL_VALUE);
MonitoredItemCreateRequest request1 = new MonitoredItemCreateRequest(readValueId1, MonitoringMode.Reporting, parameters);
MonitoredItemCreateRequest request2 = new MonitoredItemCreateRequest(readValueId2, MonitoringMode.Reporting, parameters);
MonitoredItemCreateRequest request3 = new MonitoredItemCreateRequest(readValueId3, MonitoringMode.Reporting, parameters);
List<UaMonitoredItem> items = subscription.createMonitoredItems(TimestampsToReturn.Both, newArrayList(request1, request2, request3)).get();
UaMonitoredItem item1 = items.get(0);
UaMonitoredItem item2 = items.get(1);
UaMonitoredItem item3 = items.get(2);
item1.setValueConsumer(consumer);
item2.setValueConsumer(consumer);
item3.setValueConsumer(consumer);-----------
The consumer of type BiConsumer<UaMonitoredItem, DataValue> receives the same UaMonitoredItem with DataValues corresponding to item1, item2, item3
I think that for each item the consumer should receive (item1,datavalue1), (item2,datavalue2), (item3,datavalue3), instead the consumer receives (item1,datavalue1), (item1,datavalue2), (item1,datavalue3)
Regards,