Move serialization logic ot concrete queues