Sink API: Off-heap queue is not drained until a message comes in
Description
(Tested with SNMP trap case, likely applies to others as well)
When Minion starts, the sink message dispatcher is not initialized until a corresponding message is received. This leads to undesirable behaviour when dealing with the off-heap queue. When we start up and there is entries on disk for the off-heap queue we will not start processing them until we receive a message of the same type since the dispatcher has not yet been started (which means the off-heap queue has not been loaded yet).
If we start with a full queue on disk, we will not drain any messages from that queue until we receive another message. If that other message is not received for some time, we will be wasting time we could be dispatching entries from the queue.
Ideally we would start draining the queue immediately after startup.
(Tested with SNMP trap case, likely applies to others as well)
When Minion starts, the sink message dispatcher is not initialized until a corresponding message is received. This leads to undesirable behaviour when dealing with the off-heap queue. When we start up and there is entries on disk for the off-heap queue we will not start processing them until we receive a message of the same type since the dispatcher has not yet been started (which means the off-heap queue has not been loaded yet).
If we start with a full queue on disk, we will not drain any messages from that queue until we receive another message. If that other message is not received for some time, we will be wasting time we could be dispatching entries from the queue.
Ideally we would start draining the queue immediately after startup.