Fix concurrency

Enqueuing and Dequeuing a message against write queue is not
thread safe. ConcurrentLinkedQueue should be used.