Drain message queues at termination