optimized batch sending messages