[Reposted] How to get last sample all available instances

2 posts / 0 new
Last post
Offline
Last seen: 11 years 4 months ago
Joined: 05/27/2013
Posts: 8
[Reposted] How to get last sample all available instances

Previously I was having a problem retrieving the last sample of all available instances on a topic. My java listener was only able to retrieve one sample of the last written/updated instance and my Qos settings were:

reliability kind = reliable reliability
max samples per instance = 1
max samples = 2000
max instances = 2000
durability kind = persistent durability
direct communication = true
history kind = keep last history
history depth = 1
ownership kind = exclusive

I found a bug in the writer which was using the same instance handle to write the 2nd instance, resulting in the reader only being able to retrieve only one sample.

rose's picture
Offline
Last seen: 3 years 4 months ago
Joined: 08/22/2011
Posts: 148

I am glad you were able to solve that - it is a hard problem to track down.  Did you find the problem through code inspection?