Queue size
QueueSize is how many notifications a MonitoredItem may hold between publishing cycles. Size it as the publishing interval divided by the sampling interval, rounded up, whenever you need every sample. The default of 1 keeps a single value per cycle. When the queue is full the item drops a notification and sets the overflow bit.
The sizing rule
Samples produced per cycle is publishing interval divided by sampling interval. A 100 ms item in a 1000 ms subscription produces ten, so QueueSize must be at least ten to deliver them all, and a little more to absorb jitter in the server's scheduler. If you only care about the current value, QueueSize 1 with DiscardOldest true is correct and cheap - just make it a decision rather than a default.
What overflow costs and how it is signalled
When the queue is full, DiscardOldest decides which notification is dropped, and the server sets an overflow InfoBit in the StatusCode of the notification that remains. The severity bits still evaluate to Good, so no client sees an error. The only way to know is to inspect that bit, count it, and raise QueueSize until the counter stays at zero.
It is server memory, multiplied
Each queue slot holds a full DataValue - value, status and timestamps - and the cost is per item. Ten thousand items with a queue of fifty is half a million buffered DataValues on a device that may have tens of megabytes of RAM. Servers therefore clamp requested queue sizes, and the RevisedQueueSize in the response is the number that applies. Event queues on event-type items follow the same mechanism.
Example
Queue sizing table
publishing sampling samples/cycle QueueSize result
1000 ms 1000 ms 1 1 every sample delivered
1000 ms 100 ms 10 1 9 of 10 dropped, overflow bit set, status Good
1000 ms 100 ms 10 10 every sample delivered
1000 ms 100 ms 10 12 every sample delivered, jitter absorbed
1000 ms 0 ms server-defined 1 unknowable loss - never combine 0 with a queue of 1
RevisedQueueSize in the response is the value that applies, not the one you asked for.
Defined in: Part 4 - Services, CreateMonitoredItems and the MonitoredItem queue model.
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.