Qpid
  1. Qpid
  2. QPID-3773

Creating exchange source routes to different brokers can fail if the channels overlap.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.14
    • Fix Version/s: 0.15
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      The following valid configuration results in a failure to create a second bridge queue:

      ./qpidd --auth no --no-data-dir -p 7777 &
      ./qpidd --auth no --no-data-dir -p 8888 &
      ./qpidd --auth no --no-data-dir -p 9999 &

      [kgiusti@localhost src (trunk)]$ qpid-config -a127.0.0.1:7777 add exchange topic ex1
      [kgiusti@localhost src (trunk)]$ qpid-config -a127.0.0.1:8888 add exchange topic ex1
      [kgiusti@localhost src (trunk)]$ qpid-config -a127.0.0.1:9999 add exchange topic ex1
      [kgiusti@localhost src (trunk)]$ qpid-route -s route add 127.0.0.1:7777 127.0.0.1:8888 ex1 "#"
      [kgiusti@localhost src (trunk)]$ qpid-route -s route add 127.0.0.1:9999 127.0.0.1:8888 ex1 "#"

      This should result in two bridge queues being created on 127.0.0.1:8888; one queue for the route to :7777, the other for the route to :9999.

      What actually happens is one queue is created:

      [kgiusti@localhost src (trunk)]$ qpid-stat -q 127.0.0.1:8888
      Queues
      queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind
      ====================================================================================================================================
      ...
      bridge_queue_1_c1de955c-3632-4a7d-b6d8-be9890ff38b3 Y Y 0 0 0 0 0 0 1 2
      ...

      This is due to the way the broker generates the name for the queue. The format of the name is "bridge_queue_" + channel# + broker's federation uuid. In the failure case, the channel # happens to be the same for both routes, which results in duplicate names for different queues.

        Activity

        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3560/#review5009
        -----------------------------------------------------------

        Ship it!

        • Gordon

        On 2012-01-20 00:01:40, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3560/

        -----------------------------------------------------------

        (Updated 2012-01-20 00:01:40)

        Review request for qpid, Gordon Sim, michael goulish, and Ted Ross.

        Summary

        -------

        The fix replaces the per-broker federation uuid with a unique uuid for each queue created.

        I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name.

        -K

        This addresses bug qpid-3773.

        https://issues.apache.org/jira/browse/qpid-3773

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

        Diff: https://reviews.apache.org/r/3560/diff

        Testing

        -------

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/#review5009 ----------------------------------------------------------- Ship it! Gordon On 2012-01-20 00:01:40, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/ ----------------------------------------------------------- (Updated 2012-01-20 00:01:40) Review request for qpid, Gordon Sim, michael goulish, and Ted Ross. Summary ------- The fix replaces the per-broker federation uuid with a unique uuid for each queue created. I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name. -K This addresses bug qpid-3773. https://issues.apache.org/jira/browse/qpid-3773 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 Diff: https://reviews.apache.org/r/3560/diff Testing ------- Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2012-01-20 12:19:14, Gordon Sim wrote:

        > This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers".

        Kenneth Giusti wrote:

        Ah, good find - I didn't realize that. "Easier"... I could debate that - took me awhile to find where that uuid is visible from (hint: check vhost qmf object).

        Since this "feature" is totally undocumented - aside from that log entry - do we really need to preserve this? Can't the same information be made available via the QMF schema? (I think it may be - the Subscription can be traced back to the Connection, albeit indirectly).

        Otherwise, I can back this change out. Perhap suffix the queue name with a simple sequence number?

        Gordon Sim wrote:

        I tend to agree with you, it doesn't seem like a big win as it is and more direct correlation via QMF would be better. I merely wanted to highlight that the current situation was a deliberate change from what your proposing as a fix. Unless there is something more compelling I'd be inclined to go with your patch.

        I'd like to get this in for 0.16 - the proposed fix has been out for awhile, and I haven't heard any objections (yet).

        Any objections?

        • Kenneth

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3560/#review4486
        -----------------------------------------------------------

        On 2012-01-20 00:01:40, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3560/

        -----------------------------------------------------------

        (Updated 2012-01-20 00:01:40)

        Review request for qpid, Gordon Sim, michael goulish, and Ted Ross.

        Summary

        -------

        The fix replaces the per-broker federation uuid with a unique uuid for each queue created.

        I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name.

        -K

        This addresses bug qpid-3773.

        https://issues.apache.org/jira/browse/qpid-3773

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

        Diff: https://reviews.apache.org/r/3560/diff

        Testing

        -------

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - On 2012-01-20 12:19:14, Gordon Sim wrote: > This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers". Kenneth Giusti wrote: Ah, good find - I didn't realize that. "Easier"... I could debate that - took me awhile to find where that uuid is visible from (hint: check vhost qmf object). Since this "feature" is totally undocumented - aside from that log entry - do we really need to preserve this? Can't the same information be made available via the QMF schema? (I think it may be - the Subscription can be traced back to the Connection, albeit indirectly). Otherwise, I can back this change out. Perhap suffix the queue name with a simple sequence number? Gordon Sim wrote: I tend to agree with you, it doesn't seem like a big win as it is and more direct correlation via QMF would be better. I merely wanted to highlight that the current situation was a deliberate change from what your proposing as a fix. Unless there is something more compelling I'd be inclined to go with your patch. I'd like to get this in for 0.16 - the proposed fix has been out for awhile, and I haven't heard any objections (yet). Any objections? Kenneth ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/#review4486 ----------------------------------------------------------- On 2012-01-20 00:01:40, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/ ----------------------------------------------------------- (Updated 2012-01-20 00:01:40) Review request for qpid, Gordon Sim, michael goulish, and Ted Ross. Summary ------- The fix replaces the per-broker federation uuid with a unique uuid for each queue created. I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name. -K This addresses bug qpid-3773. https://issues.apache.org/jira/browse/qpid-3773 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 Diff: https://reviews.apache.org/r/3560/diff Testing ------- Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2012-01-20 12:19:14, Gordon Sim wrote:

        > This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers".

        Kenneth Giusti wrote:

        Ah, good find - I didn't realize that. "Easier"... I could debate that - took me awhile to find where that uuid is visible from (hint: check vhost qmf object).

        Since this "feature" is totally undocumented - aside from that log entry - do we really need to preserve this? Can't the same information be made available via the QMF schema? (I think it may be - the Subscription can be traced back to the Connection, albeit indirectly).

        Otherwise, I can back this change out. Perhap suffix the queue name with a simple sequence number?

        I tend to agree with you, it doesn't seem like a big win as it is and more direct correlation via QMF would be better. I merely wanted to highlight that the current situation was a deliberate change from what your proposing as a fix. Unless there is something more compelling I'd be inclined to go with your patch.

        • Gordon

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3560/#review4486
        -----------------------------------------------------------

        On 2012-01-20 00:01:40, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3560/

        -----------------------------------------------------------

        (Updated 2012-01-20 00:01:40)

        Review request for qpid, Gordon Sim, michael goulish, and Ted Ross.

        Summary

        -------

        The fix replaces the per-broker federation uuid with a unique uuid for each queue created.

        I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name.

        -K

        This addresses bug qpid-3773.

        https://issues.apache.org/jira/browse/qpid-3773

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

        Diff: https://reviews.apache.org/r/3560/diff

        Testing

        -------

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - On 2012-01-20 12:19:14, Gordon Sim wrote: > This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers". Kenneth Giusti wrote: Ah, good find - I didn't realize that. "Easier"... I could debate that - took me awhile to find where that uuid is visible from (hint: check vhost qmf object). Since this "feature" is totally undocumented - aside from that log entry - do we really need to preserve this? Can't the same information be made available via the QMF schema? (I think it may be - the Subscription can be traced back to the Connection, albeit indirectly). Otherwise, I can back this change out. Perhap suffix the queue name with a simple sequence number? I tend to agree with you, it doesn't seem like a big win as it is and more direct correlation via QMF would be better. I merely wanted to highlight that the current situation was a deliberate change from what your proposing as a fix. Unless there is something more compelling I'd be inclined to go with your patch. Gordon ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/#review4486 ----------------------------------------------------------- On 2012-01-20 00:01:40, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/ ----------------------------------------------------------- (Updated 2012-01-20 00:01:40) Review request for qpid, Gordon Sim, michael goulish, and Ted Ross. Summary ------- The fix replaces the per-broker federation uuid with a unique uuid for each queue created. I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name. -K This addresses bug qpid-3773. https://issues.apache.org/jira/browse/qpid-3773 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 Diff: https://reviews.apache.org/r/3560/diff Testing ------- Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2012-01-20 12:19:14, Gordon Sim wrote:

        > This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers".

        Ah, good find - I didn't realize that. "Easier"... I could debate that - took me awhile to find where that uuid is visible from (hint: check vhost qmf object).

        Since this "feature" is totally undocumented - aside from that log entry - do we really need to preserve this? Can't the same information be made available via the QMF schema? (I think it may be - the Subscription can be traced back to the Connection, albeit indirectly).

        Otherwise, I can back this change out. Perhap suffix the queue name with a simple sequence number?

        • Kenneth

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3560/#review4486
        -----------------------------------------------------------

        On 2012-01-20 00:01:40, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3560/

        -----------------------------------------------------------

        (Updated 2012-01-20 00:01:40)

        Review request for qpid, Gordon Sim, michael goulish, and Ted Ross.

        Summary

        -------

        The fix replaces the per-broker federation uuid with a unique uuid for each queue created.

        I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name.

        -K

        This addresses bug qpid-3773.

        https://issues.apache.org/jira/browse/qpid-3773

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

        Diff: https://reviews.apache.org/r/3560/diff

        Testing

        -------

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - On 2012-01-20 12:19:14, Gordon Sim wrote: > This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers". Ah, good find - I didn't realize that. "Easier"... I could debate that - took me awhile to find where that uuid is visible from (hint: check vhost qmf object). Since this "feature" is totally undocumented - aside from that log entry - do we really need to preserve this? Can't the same information be made available via the QMF schema? (I think it may be - the Subscription can be traced back to the Connection, albeit indirectly). Otherwise, I can back this change out. Perhap suffix the queue name with a simple sequence number? Kenneth ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/#review4486 ----------------------------------------------------------- On 2012-01-20 00:01:40, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/ ----------------------------------------------------------- (Updated 2012-01-20 00:01:40) Review request for qpid, Gordon Sim, michael goulish, and Ted Ross. Summary ------- The fix replaces the per-broker federation uuid with a unique uuid for each queue created. I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name. -K This addresses bug qpid-3773. https://issues.apache.org/jira/browse/qpid-3773 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 Diff: https://reviews.apache.org/r/3560/diff Testing ------- Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3560/#review4486
        -----------------------------------------------------------

        This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers".

        • Gordon

        On 2012-01-20 00:01:40, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3560/

        -----------------------------------------------------------

        (Updated 2012-01-20 00:01:40)

        Review request for qpid, Gordon Sim, michael goulish, and Ted Ross.

        Summary

        -------

        The fix replaces the per-broker federation uuid with a unique uuid for each queue created.

        I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name.

        -K

        This addresses bug qpid-3773.

        https://issues.apache.org/jira/browse/qpid-3773

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

        Diff: https://reviews.apache.org/r/3560/diff

        Testing

        -------

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/#review4486 ----------------------------------------------------------- This in essence reverts http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?r1=707515&r2=709342&pathrev=709532 where the bridges own UUID was replaced with the brokers federation tag. The comment for the commit states this was done to make it "easier to determine which queues go to which brokers". Gordon On 2012-01-20 00:01:40, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/ ----------------------------------------------------------- (Updated 2012-01-20 00:01:40) Review request for qpid, Gordon Sim, michael goulish, and Ted Ross. Summary ------- The fix replaces the per-broker federation uuid with a unique uuid for each queue created. I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name. -K This addresses bug qpid-3773. https://issues.apache.org/jira/browse/qpid-3773 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 Diff: https://reviews.apache.org/r/3560/diff Testing ------- Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3560/
        -----------------------------------------------------------

        Review request for qpid, Gordon Sim, michael goulish, and Ted Ross.

        Summary
        -------

        The fix replaces the per-broker federation uuid with a unique uuid for each queue created.

        I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name.

        -K

        This addresses bug qpid-3773.
        https://issues.apache.org/jira/browse/qpid-3773

        Diffs


        /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

        Diff: https://reviews.apache.org/r/3560/diff

        Testing
        -------

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3560/ ----------------------------------------------------------- Review request for qpid, Gordon Sim, michael goulish, and Ted Ross. Summary ------- The fix replaces the per-broker federation uuid with a unique uuid for each queue created. I'm not aware of anything that is sensitive to the current format of the bridge queue name, and expects to find a federation uuid in the name. -K This addresses bug qpid-3773. https://issues.apache.org/jira/browse/qpid-3773 Diffs /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 Diff: https://reviews.apache.org/r/3560/diff Testing ------- Thanks, Kenneth

          People

          • Assignee:
            Ken Giusti
            Reporter:
            Ken Giusti
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development