Limit flushQueueSize to MAX_QUEUE_SIZE