def METHOD_NAME(self, message):
    while True:
        message_id = '%s-%s' % (
            message.get('target', '-'),
            uuid.uuid4().hex,
        )
        if message_id not in self.id_cache:
            self.id_cache[message_id] = time.time()
            break
    message['id'] = message_id
    return self.transport.send(pickle.dumps(message))