Description of problem: There is a need in the field for a MRG 2.x broker to set up federation to a MRG 3 broker. This fails due to schema changes in MRG 3 (see QPID-4728 upstream). BZ 1120081 has the original discussion regarding fixing this incompatibililty. At the time, it was decided to leave the change and document the one-way problem (can't initiate from MRG 2) Version-Release number of selected component (if applicable): qpid-cpp-0.34-*, qpid-tools-0.34-* qpid-cpp-0.18-*, qpid-tools-0.18-* How reproducible: 100%, see https://bugzilla.redhat.com/show_bug.cgi?id=1120081#c0 Actual results: Cannot set up federation in both directions. Expected results: Able to set up federation in both directions between MRG-M 2 and 3 Additional info: Customer cannot update the MRG 2 side, so solution must involve only MRG 3 changes.
Which version of MRG2 are they stuck at?
According to code comments, the link.bridge method has already been deprecated in favour of the broker.create() method which is more flexible. If MRG 3 users have moved away from the bridge method that may help ease the pain, but I don't know how clearly deprecated it was - our own tools still use it.
Fix pushed: http://git.app.eng.bos.redhat.com/git/rh-qpid.git/commit/?h=0.34-mrg-aconway-bz1324845 MRG3+ and MRG2 are all good in both directions but there is an interop problem between MRG3 and MRG3+. I don't see how to avoid it. ==== Bug 1324845 - Federation does not interoperate between MRG-M 2 and 30.34-mrg-aconway-bz1324845 An extra 'credit' argument was added to the link.bridge() management operation in MRG3, which means the MRG2 qpid-route tool cannot add routes to a MRG3 broker. The link.bridge() operation was deprecated in MRG2 in favour of broker.create("bridge"...) but was still in use by the qpid-route tool. This patch (I'll call it MRG3+ for clarity) - Removes 'credit' argument from link.bridge() - Modifies qpid-route to use broker.create() The interop result: - MRG2 qpid-route - MRG2 broker: ok, no credit. - MRG3 broker: FAILS, the reason for this fix. - MRG3+ broker: ok, no credit set (default unlimited) - MRG3 qpid-route - MRG2 broker: ok, credit ignored. - MRG3 broker: ok, credit set. - MRG3+: route created but credit IGNORED, default unlimited. - MRG3+ qpid-route - MRG2 broker: ok, credit is ignored. - MRG3/MRG3+ broker: ok, credit is set. The new problem is MRG3 qpid-route -> MRG3+ broker. The route is created but the credit setting is ignored without warning.
Created attachment 1147278 [details] Script to test all the combinations of MRG2, MRG3 and MRG3+ for interop. Not an automated test but prints a readable summary of running all qpid-route versions against all qpidd versions so you can verify the expected behavior. Note that credit=0 and credit=4294967295 both mean the same thing - unlimited credit.
Reproducer for QE: 0) Theory about broker federation: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/3/html-single/Messaging_Installation_and_Configuration_Guide/index.html#chap-Broker_Federation 1) have 2 machines: - 1st with some MRG3 - 2nd with MRG2 (get packages from download.eng.bos.redhat.com/brewroot/////packages/qpid-cpp/0.18 resp. relevant subdir) 2) start both brokers 3) create some provisioning and then test routes/federations from mrg2 to mrg3: # run all on mrg3: qpid-config add queue q # test exchange route from mrg2 to mrg3 - qpid-receive should print a message qpid-config bind amq.fanout q qpid-route route add mrg3 mrg2 amq.fanout qpid-send -b mrg2 -a amq.fanout -m1 qpid-receive -a q -b mrg3 -m1 qpid-route route del mrg3 mrg2 amq.fanout qpid-config unbind amq.fanout q # test queue route from mrg2 to mrg3 - qpid-receive should print a message qpid-route queue add mrg3 mrg2 amq.fanout q qpid-send -b mrg2 -a amq.fanout -m1 qpid-receive -a q -m1 qpid-route queue del mrg3 mrg2 amq.fanout q 4) create some provisioning and then test routes/federations from mrg3 to mrg2: # run all on mrg2: qpid-config add queue q # test exchange route from mrg3 to mrg2 - qpid-receive should print a message qpid-config bind amq.fanout q qpid-route route add mrg2 mrg3 amq.fanout qpid-send -b mrg3 -a amq.fanout -m1 qpid-receive -a q -b mrg2 -m1 qpid-route route del mrg2 mrg3 amq.fanout qpid-config unbind amq.fanout q # test queue route from mrg3 to mrg2 - qpid-receive should print a message qpid-route queue add mrg2 mrg3 amq.fanout q qpid-send -b mrg3 -a amq.fanout -m1 qpid-receive -a q -m1 qpid-route queue del mrg2 mrg3 amq.fanout q
I tried the reproducer from comment 6 but it seems to have some errors - the unbind at the end of the route test means that q doesn't get any message in the queue route. This modified version works for me, I gave the queues different names just to avoid confusion: # run all on mrg3: qpid-config -b $mrg3 add queue q echo test exchange route from mrg2 to mrg3 - qpid-receive should print TEST qpid-config -b $mrg3 bind amq.fanout q qpid-route route add $mrg3 $mrg2 amq.fanout q qpid-send -b $mrg2 -a amq.fanout -m1 --content-string TEST qpid-receive -b $mrg3 -a q -m1 qpid-route route del $mrg3 $mrg2 amq.fanout q #ERROR: unbinding q here means it won't receive messages from the queue route below. #qpid-config -b $mrg3 unbind amq.fanout q echo test queue route from mrg2 to mrg3 - qpid-receive should print TEST qpid-config -b $mrg2 add queue q2 # Missing creation of queue on mrg2 for queue route source. qpid-route queue add $mrg3 $mrg2 amq.fanout q2 qpid-send -b $mrg2 -a q2 -m1 --content-string TEST qpid-receive -b $mrg3 -a q -m1 qpid-route queue del $mrg3 $mrg2 amq.fanout q2 # run all on mrg2: qpid-config -b $mrg2 add queue qq echo test exchange route from mrg3 to mrg2 - qpid-receive should print TEST qpid-config -b $mrg2 bind amq.fanout qq qpid-route route add $mrg2 $mrg3 amq.fanout qq qpid-send -b $mrg3 -a amq.fanout -m1 --content-string TEST qpid-receive -b $mrg2 -a qq -m1 qpid-route route del $mrg2 $mrg3 amq.fanout qq #ERROR: unbinding qq here means it won't receive messages from the queue route below. #qpid-config -b $mrg2 unbind amq.fanout qq echo test queue route from mrg3 to mrg2 - qpid-receive should print TEST qpid-config -b $mrg3 add queue qq2 # Missing creation of queue on mrg3 for queue route source. qpid-route queue add $mrg2 $mrg3 amq.fanout qq2 qpid-send -b $mrg3 -a qq2 -m1 --content-string TEST qpid-receive -b $mrg2 -a qq -m1 qpid-route queue del $mrg2 $mrg3 amq.fanout qq2
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2049.html