socket-collection outgoing data is stored in multiple queues with
different priorities. Those queues are ordered by priorities.
Every message also has a timestamp and could expire. socket-collection
drops queues with expired messages.
Expired queues
The whole queue is considered expired, if it's first message got
expired. Then socket-collection will drop expired outgoing queues.
The way it collects expired queues might be unexpected: it doesn't
filter all queues that got expired, but instead iterates trough
all queues in order by priority, skips not expired queues, finds
the first expired one and drops it together with all queues with
subsequent priorities.
Background
socket-collection outgoing data is stored in multiple queues with different priorities. Those queues are ordered by priorities. Every message also has a timestamp and could expire. socket-collection drops queues with expired messages.
Expired queues
The whole queue is considered expired, if it's first message got expired. Then socket-collection will drop expired outgoing queues. The way it collects expired queues might be unexpected: it doesn't filter all queues that got expired, but instead iterates trough all queues in order by priority, skips not expired queues, finds the first expired one and drops it together with all queues with subsequent priorities.