----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20328/ -----------------------------------------------------------
Review request for qpid, Gordon Sim and Ted Ross. Repository: qpid Description ------- When a topic delete request is issued and the topic does not exist and there is an exchange of that name, the exchange is deleted which is obviously not intended. When the topic exists the topic is deleted first, see additional info for more details. Steps to Reproduce: 1. qpid-config add exchange fanout myExchange 2. qpid-config del topic myExchange Exchange myExchange removed instead of 'Topic not found' exception If the amqp.so module is loaded, the request to delete the topic should be handled by the registered objectFactory Topic::deleteObject(). Rather than return false when a request to delete the topic is received and the topic is not found, this patch throws a NotFoundException. The code in Broker::deleteObject() that treats topic as a synonym for exchange was left intact in case the amqp.so module is not loaded. In that case the code will function as before and topic deletes will delete exchanges. Diffs ----- /trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp 1587241 Diff: https://reviews.apache.org/r/20328/diff/ Testing ------- with amqp.so loaded >qpid-config add exchange topic myExchange >qpid-config del topic myExchange Failed: Exception: Exception from Agent: {u'error_code': 7, u'error_text': 'not-found: Delete failed. No such topic: myExchange (/home/eallen/rpmbuild/BUILD/qpid-0.22/cpp/src/qpid/broker/amqp/Topic.cpp:141)'} with amqp.so not loaded >qpid-config add exchange topic myExchange >qpid-config del topic myExchange > >qpid-config list exchange Objects of type 'exchange' name type durable ====================================== direct False amq.direct direct True amq.fanout fanout True amq.match headers True amq.topic topic True qmf.default.direct direct False qmf.default.topic topic False qpid.management topic False Thanks, Ernie Allen
