Description of problem: Broker restart fails with durable topic created with a non-durable exchange. Version-Release number of selected component (if applicable): qpid-cpp-0.22-42 How reproducible: 100% Steps to Reproduce: 1. qpid-config add exchange fanout test.ex 2. qpid-config add topic test.topic --argument exchange=test.ex --argument durable=True 3. service qpidd restart Actual results: root @rhel6i ~ $ 15:41:07 # service qpidd restart Stopping Qpid AMQP daemon: [ OK ] Starting Qpid AMQP daemon: Daemon startup failed: not-found: Exchange not found: test.ex (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/ExchangeRegistry.cpp:144) [FAILED] Expected results: Broker starts successfully. Or an attempt to create a durable topic with non-durable exchange returns an error. Additional info:
I am assuming legacystore. I can't reproduce this error based soley on a recovery. In my tests, the broker recovers test.topic ok: qpid: list exchange Object Summary: ID Created Destroyed Index ================================================== 117 19:07:01 - 138. 118 19:07:01 - 138.amq.direct 119 19:07:01 - 138.amq.fanout 120 19:07:01 - 138.amq.match 121 19:07:01 - 138.amq.topic 122 19:07:01 - 138.qmf.default.direct 123 19:07:01 - 138.qmf.default.topic 124 19:07:01 - 138.qpid.management 125 19:07:01 - 138.test.topic qpid: show 125 Object of type: org.apache.qpid.broker:exchange:_data(...) Attribute 125 ============================================== vhostRef 138 name test.topic type topic durable True autoDelete False altExchange absent arguments {u'exchange': u'test.ex'} ... and even though test.ex does not exist, it does not fail with the error described above. The above description suggests the failure occurs somewhere in recovery - perhaps I am missing a step? This raises the question on how to handle this case: 1. The operation which creates the durable topic exchange (step 2 above) should fail because it uses a non-durable exchange as an argument - this will need to be decected and handled within qpid-config. 2. The broker should handle this failure with an error message in the log. The error message can only say that the exchange is non-existent, but not why (deleting the exchange after creation, even if it is durable would presumably lead to the same result). I'll continue to try to obtain the same result described above.
I am sorry for confusion. I am talking here amqp1.0 topic object, not the topic exchange. Please try to use the 'Steps to Reproduce ' from the above. To list the topic object you can use qpid-config list topic or qpid-tool : list topic Also please note, this is new linear store.
I have this reproduced. The error occurs when a Topic object is recoverd. It fails to handle the case when the exchange upon which it depends does not exist, and the exception is unhandled. A proposed simple fix catches the exception, and allows existing code to print an error message that the topic recovery failed and allows the broker to continue recovery. Further comments are on the upstream bug QPID-9548 (link above). I am not very familiar with the new AMQP code; I would appreciate some reviews on this proposed fix: https://reviews.apache.org/r/24251/
Fixed upstream: https://svn.apache.org/r1616287
At this moment, durable topic can be created only with a durable exchange (otherwise an exception is thrown). Verified on qpid-cpp-0.22-46