Add new_publisher and new_consumer to MessageQueue class