Discard oldest
DiscardOldest is the per-MonitoredItem boolean deciding which notification is thrown away when the queue is full. True, the usual default, discards the oldest entry and keeps the newest values. False discards the incoming notification and keeps the oldest. Either way a sample is lost and the overflow bit is set on the queue.
Which one to choose
True is right for anything where current state matters - HMI values, live trends, control feedback - because losing history is preferable to displaying a stale number. False is occasionally right when the first samples after an event are the interesting ones and the later ones are noise, for example capturing the leading edge of a fault. In practice almost every production configuration uses true.
The degenerate case: QueueSize 1
With a queue of one and DiscardOldest true you get classic last-value-wins behaviour: one value per publishing cycle, always the most recent. That is a perfectly sensible configuration for slow status tags and dashboards, and it is what most clients configure by default. It becomes a defect only when the sampling interval is faster than the publishing interval and the intermediate samples mattered.
There is no back-pressure
Neither setting slows the sampler or asks the client to catch up. OPC UA subscriptions drop rather than block, which is what keeps a slow client from stalling a server. If you cannot afford to drop samples, the answer is a bigger queue, a slower sampling interval or a deadband - not a different discard policy.
Example
Four samples into a queue of two
Samples arriving between publishing cycles: A B C D QueueSize 2
DiscardOldest = true queue ends as [C, D] A and B dropped, overflow bit set
DiscardOldest = false queue ends as [A, B] C and D dropped, overflow bit set
Both lose two samples. The flag chooses which two, never whether.
Defined in: Part 4 - Services, CreateMonitoredItems and the queue overflow handling.
Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.