[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-09-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on QPID-7876:
--

Github user chrisrichardson77 closed the pull request at:

https://github.com/apache/qpid-cpp/pull/7


> 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
>Assignee: Gordon Sim
> Fix For: qpid-cpp-1.37.0
>
> Attachments: test-routes.sh
>
>   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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-09-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on QPID-7876:
--

Github user chrisrichardson77 commented on the issue:

https://github.com/apache/qpid-cpp/pull/7
  
Merged, closing.


> 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
>Assignee: Gordon Sim
> Fix For: qpid-cpp-1.37.0
>
> Attachments: test-routes.sh
>
>   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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-09-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on QPID-7876:
--

Github user gemmellr commented on the issue:

https://github.com/apache/qpid-cpp/pull/7
  
@chrisrichardson77 A change for this looks to have been made in 
https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;a=commitdiff;h=edccbc9e1737603a1d1f66f0df8499dbba07e93b,
 can you close the PR please?

(The commit log message that can do it wasnt used when the fix was 
committed, and as its a read-only mirror we cant do it directly)


> 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
>Assignee: Gordon Sim
> Fix For: qpid-cpp-1.37.0
>
> Attachments: test-routes.sh
>
>   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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-04 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on QPID-7876:
---

Commit 55d4171a8155d9f6a07a48507e33d43b8cb6d904 in qpid-cpp's branch 
refs/heads/master from [~chris.richardson]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;h=55d4171 ]

QPID-7876 qpid-route does not properly consider src-local when matching bridges


> 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
> Attachments: test-routes.sh
>
>   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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-04 Thread Gordon Sim (JIRA)

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

Gordon Sim commented on QPID-7876:
--

Thanks Chris, that's a useful test! Ran before and after your latest fixes, 
looks good!

> 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
> Attachments: test-routes.sh
>
>   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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-04 Thread Chris Richardson (JIRA)

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

Chris Richardson commented on QPID-7876:


[~gsim], I think I've got it right now - apologies for the messy approach!

I had a look at extending the tests in federation.py to better test the 
RouteManager class but I'm afraid I baulked at the CTest/python/valgrind world 
I found myself in; the attached bash script may have to suffice for now.

> 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
> Attachments: test-routes.sh
>
>   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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-03 Thread Gordon Sim (JIRA)

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

Gordon Sim commented on QPID-7876:
--

Sorry! I should have spotted that before committing. (A gap in the limited 
tests for the qpid-route tool it seems as well).

> 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-03 Thread Gordon Sim (JIRA)

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

Gordon Sim commented on QPID-7876:
--

Yes, I think that name should be fine. Its better than what the broker was 
generating as you say.

> 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-03 Thread Chris Richardson (JIRA)

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

Chris Richardson commented on QPID-7876:


Damn, I didn't use link name . I'll update the PR.

> 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-03 Thread Chris Richardson (JIRA)

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

Chris Richardson commented on QPID-7876:


[~gsim] Did you notice my comment in the PR about bridge naming? As stated I 
wasn't sure how to construct a unique name so I  basically made something 
up. It just so happened that it independently almost matched the implementation 
in Broker::createName.
Considerations were:
* the name can't start with QPID_NAME_PREFIX ("qpid.") (enforced by broker)
* Uniqueness should probably be consistent with the route matching pattern 
(link, src, dest, key, src_local). This is not the case in Broker::createName 
which does not use src_local. However I don't think that that implementation is 
used any more (kind != ENCODED_IDENTIFIER_V1)...

> 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-02 Thread Gordon Sim (JIRA)

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

Gordon Sim commented on QPID-7876:
--

Thanks again Chris!

> 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-02 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on QPID-7876:
---

Commit edccbc9e1737603a1d1f66f0df8499dbba07e93b in qpid-cpp's branch 
refs/heads/master from [~chris.richardson]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;h=edccbc9 ]

QPID-7876 qpid-route does not properly consider src-local when matching bridges


> 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on QPID-7876:
--

GitHub user chrisrichardson77 opened a pull request:

https://github.com/apache/qpid-cpp/pull/7

QPID-7876 qpid-route does not properly consider src-local when matchi…

See QPID-7876

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/fourceu/qpid-cpp QPID-7876

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/qpid-cpp/pull/7.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #7


commit 9f3395077552fd242a2564b3bb82ebdb64ec82d2
Author: Chris Richardson 
Date:   2017-08-01T20:03:30Z

QPID-7876 qpid-route does not properly consider src-local when matching 
bridges




> 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-01 Thread ASF GitHub Bot (JIRA)

[ 
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:

https://github.com/apache/qpid-cpp/pull/7#discussion_r130713409
  
--- Diff: management/python/bin/qpid-route ---
@@ -331,53 +337,63 @@ class RouteManager:
 if b[0] != self.local.name():
 self.qmf.delBroker(b[1])
 
-def addRoute(self, remoteBroker, exchange, routingKey, tag, excludes, 
interbroker_mechanism="", dynamic=False):
-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, routingKey))
+raise Exception("Duplicate Route - ignoring: %s(%s)" % 
(dest, key or src))
 sys.exit(0)
 
 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
(v6.4.14#64029)

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



[jira] [Commented] (QPID-7876) qpid-route does not properly consider src-local when matching bridges

2017-08-01 Thread Chris Richardson (JIRA)

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

Chris Richardson commented on QPID-7876:


Having modified qpid-route to include src-local in bridge matching, I found 
that the broker itself (silently) does not accept the new bridge for the same 
reason. On examining src/qpid/broker/Link.cpp I found the following comment 
(line 721): 

/* TBD: deprecate this interface in favor(sic) of the Broker::create() 
method.  The
 * Broker::create() method allows the user to assign a name to the 
bridge.
 */

I am therefore creating a PR in which qpid-route uses the Broker::create() 
method. This seemed like a better option than modifying the broker code, which 
is to be deprecated anyway.

> 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: 4m
>  Remaining Estimate: 4m
>
> 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
(v6.4.14#64029)

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