fix to set max queue size in MessageQueue
fix not to send if queue is full