def mpub(self, topic, msg, callback=None):
        """
        publish multiple messages in one command (efficiently)

        :param topic: nsq topic
        :param msg: list of messages bodies (which are bytes)
        :param callback: function which takes (conn, data) (data may be nsq.Error)
        """
        if isinstance(msg, bytes_types):
            msg = [msg]
        assert isinstance(msg, (list, set, tuple))

        self._pub('mpub', topic, msg, callback=callback)
def mpub(self, topic, msg, callback=None):
        """
        publish multiple messages in one command (efficiently)

        :param topic: nsq topic
        :param msg: list of messages bodies (which are bytes)
        :param callback: function which takes (conn, data) (data may be nsq.Error)
        """
        if isinstance(msg, bytes_types):
            msg = [msg]
        assert isinstance(msg, (list, set, tuple))

        self._pub('mpub', topic, msg, callback=callback)
def mpub ( self , topic , msg , callback = None ) : if isinstance ( msg , bytes_types ) : msg = [ msg ] assert isinstance ( msg , ( list , set , tuple ) ) self . _pub ( 'mpub' , topic , msg , callback = callback )
publish multiple messages in one command (efficiently)

        :param topic: nsq topic
        :param msg: list of messages bodies (which are bytes)
        :param callback: function which takes (conn, data) (data may be nsq.Error)
publish multiple messages in one command ( efficiently )