Skip to content

PubSub disable_topic_validation=True breaks multiple subscriptions #436

@ngiind

Description

@ngiind

Adding disable_topic_validation=True to pusub subscription raises ValueError when adding multiple subscriptions. Looks like the issue is that the topic map key in this case will only use the pubsub identifier (dapr\ext\grpc_servicier.py):

        if not disable_topic_validation:
            topic_key = pubsub_name + DELIMITER + topic
        else:
            topic_key = pubsub_name
        pubsub_topic = topic_key + DELIMITER
        if rule is not None:
            path = getattr(cb, '__name__', rule.match)
            pubsub_topic = pubsub_topic + path
        if pubsub_topic in self._topic_map:
            raise ValueError(
                f'{topic} is already registered with {pubsub_name}')
        self._topic_map[pubsub_topic] = cb

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions