Qpid
  1. Qpid
  2. QPID-3298

bindings with x-match:all on headers exchange do not work correctly with dynamic federation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: None
    • Labels:
      None

      Description

      I believe the issue is that the arguments used in the binding include the extra control arguments for fed.origin etc and as these are not specified in the messages, they do not match the binding.

      Using x-match:any works as expected.

        Activity

        Hide
        Gordon Sim added a comment -

        Above patch passes make check included all federation tests. Would still like review from someone more familiar with the role of the fed ops arguments.

        Show
        Gordon Sim added a comment - Above patch passes make check included all federation tests. Would still like review from someone more familiar with the role of the fed ops arguments.
        Hide
        Gordon Sim added a comment -

        The following change fixes the simple case where an x-match:all binding is propagated from dest broker to source broker and matches a messages that has the full set of properties specified by the user. Whether it is fully correct for operation of dynamic federation would be best verified by someone more familiar with that code.

        Index: src/qpid/broker/HeadersExchange.cpp
        ===================================================================
        --- src/qpid/broker/HeadersExchange.cpp	(revision 1130102)
        +++ src/qpid/broker/HeadersExchange.cpp	(working copy)
        @@ -112,9 +112,9 @@
         
                 {
                     Mutex::ScopedLock l(lock);
        -            Binding::shared_ptr binding (new Binding (bindingKey, queue, this, *args));
        +            Binding::shared_ptr binding (new Binding (bindingKey, queue, this, extra_args));
                     BoundKey bk(binding);
        -            if (bindings.add_unless(bk, MatchArgs(queue, args))) {
        +            if (bindings.add_unless(bk, MatchArgs(queue, &extra_args))) {
                         binding->startManagement();
                         propagate = bk.fedBinding.addOrigin(queue->getName(), fedOrigin);
                         if (mgmtExchange != 0) {
        
        Show
        Gordon Sim added a comment - The following change fixes the simple case where an x-match:all binding is propagated from dest broker to source broker and matches a messages that has the full set of properties specified by the user. Whether it is fully correct for operation of dynamic federation would be best verified by someone more familiar with that code. Index: src/qpid/broker/HeadersExchange.cpp =================================================================== --- src/qpid/broker/HeadersExchange.cpp (revision 1130102) +++ src/qpid/broker/HeadersExchange.cpp (working copy) @@ -112,9 +112,9 @@ { Mutex::ScopedLock l(lock); - Binding::shared_ptr binding (new Binding (bindingKey, queue, this, *args)); + Binding::shared_ptr binding (new Binding (bindingKey, queue, this, extra_args)); BoundKey bk(binding); - if (bindings.add_unless(bk, MatchArgs(queue, args))) { + if (bindings.add_unless(bk, MatchArgs(queue, &extra_args))) { binding->startManagement(); propagate = bk.fedBinding.addOrigin(queue->getName(), fedOrigin); if (mgmtExchange != 0) {

          People

          • Assignee:
            Gordon Sim
            Reporter:
            Gordon Sim
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development