def target_to_topic(target):
    """Convert target into topic string

    :param target: Message destination target
    :type target: oslo_messaging.Target
    """
    if target.exchange is None:
        return target.topic
    return "%s_%s" % (target.exchange, target.topic)