def parse_message(self, payload, conn_id):
        if len(payload) < FRAME_FORMAT_MESSAGE_SIZE:
            raise SnakeMQBrokenMessage("message")

        try:
            ident = self._ident_by_conn[conn_id]
        except __HOLE__:
            raise SnakeMQNoIdent(conn_id)

        muuid, ttl, flags = struct.unpack(FRAME_FORMAT_MESSAGE,
                                        memstr(payload[:FRAME_FORMAT_MESSAGE_SIZE]))
        if ttl == INFINITE_TTL:
            ttl = None
        message = Message(data=memstr(payload[FRAME_FORMAT_MESSAGE_SIZE:]),
                          uuid=muuid, ttl=ttl, flags=flags)
        self.on_message_recv(conn_id, ident, message)

    ###########################################################
dataset/ETHPy150Open dsiroky/snakemq/snakemq/messaging.py/Messaging.parse_message