qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges
Date Tue, 01 Aug 2017 20:07:00 GMT

    [ https://issues.apache.org/jira/browse/QPID-7876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109656#comment-16109656

ASF GitHub Bot commented on QPID-7876:

Github user chrisrichardson77 commented on a diff in the pull request:

    --- Diff: management/python/bin/qpid-route ---
    @@ -331,53 +337,63 @@ class RouteManager:
                 if b[0] != self.local.name():
    -    def addRoute(self, remoteBroker, exchange, routingKey, tag, excludes, interbroker_mechanism="",
    -        if dynamic and config._srclocal:
    -            raise Exception("--src-local is not permitted on dynamic routes")
    -        self.addLink(remoteBroker, interbroker_mechanism)
    -        link = self.getLink()
    -        self.checkLink(link)
    +    def addBridge(self, link, src, dest, key, tag, excludes, srcIsQueue, srcIsLocal,
    +                  durable, dynamic, sync, credit):
             bridges = self.agent.getObjects(_class="bridge")
             for bridge in bridges:
                 if bridge.linkRef == link.getObjectId() and \
    -                    bridge.dest == exchange and bridge.key == routingKey and not bridge.srcIsQueue:
    +                    bridge.dest == dest and bridge.src == src and bridge.srcIsQueue ==
srcIsQueue and \
    +                    bridge.srcIsLocal == srcIsLocal and bridge.dynamic == dynamic:
                     if not config._quiet:
    -                    raise Exception("Duplicate Route - ignoring: %s(%s)" % (exchange,
    +                    raise Exception("Duplicate Route - ignoring: %s(%s)" % (dest, key
or src))
             if config._verbose:
                 print "Creating inter-broker binding..."
    -        res = link.bridge(config._durable, exchange, exchange, routingKey, tag,
    -                          excludes, False, config._srclocal, dynamic,
    -                          config._ack, credit=config._credit)
    +        name = "%s:%s:%s:%s" % (dest, key or src, srcIsQueue, srcIsLocal)
    --- End diff --
    I was unsure of how to generate a new name for the bridge. Is this sufficient?

> qpid-route does not properly consider src-local when matching bridges
> ---------------------------------------------------------------------
>                 Key: QPID-7876
>                 URL: https://issues.apache.org/jira/browse/QPID-7876
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: qpid-cpp-1.36.0
>            Reporter: Chris Richardson
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> qpid-route does not properly consider src-local when matching bridges. The practical
upshot of this is that it may consider routes to be duplicates when they are in fact not.
> Take the following (slightly contrived) scenario:
> Brokers A and B both have queues named "test.queue" and default exchanges named "amq.direct".
> We would like a queue route to pull messages from B:test.queue to A:amq.direct and a
src_local route to push messages from A:test.queue to B:amq.direct. Since qpid-route does
not consider the src-local flag, it will regard the second route to be a duplicate and will
not allow it to be added.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message