You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by pm...@apache.org on 2014/03/04 15:50:53 UTC
svn commit: r1574119 -
/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
Author: pmoravec
Date: Tue Mar 4 14:50:53 2014
New Revision: 1574119
URL: http://svn.apache.org/r1574119
Log:
QPID-5597: [C++ client] Topic subscriptions should not ignore auto-delete x-declare flag
Modified:
qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp?rev=1574119&r1=1574118&r2=1574119&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp Tue Mar 4 14:50:53 2014
@@ -245,6 +245,7 @@ class Subscription : public Exchange, pu
const bool reliable;
const std::string actualType;
const bool exclusiveQueue;
+ const bool autoDeleteQueue;
const bool exclusiveSubscription;
const std::string alternateExchange;
FieldTable queueOptions;
@@ -523,6 +524,7 @@ Subscription::Subscription(const Address
reliable(durable ? !AddressResolution::is_unreliable(address) : AddressResolution::is_reliable(address)),
actualType(type.empty() ? (specifiedType.empty() ? TOPIC_EXCHANGE : specifiedType) : type),
exclusiveQueue((Opt(address)/LINK/X_DECLARE/EXCLUSIVE).asBool(true)),
+ autoDeleteQueue((Opt(address)/LINK/X_DECLARE/AUTO_DELETE).asBool(true)),
exclusiveSubscription((Opt(address)/LINK/X_SUBSCRIBE/EXCLUSIVE).asBool(exclusiveQueue)),
alternateExchange((Opt(address)/LINK/X_DECLARE/ALTERNATE_EXCHANGE).str())
{
@@ -597,7 +599,7 @@ void Subscription::subscribe(qpid::clien
//create subscription queue:
session.queueDeclare(arg::queue=queue, arg::exclusive=exclusiveQueue,
- arg::autoDelete=!(durable || reliable), arg::durable=durable,
+ arg::autoDelete=autoDeleteQueue && (!(durable || reliable)), arg::durable=durable,
arg::alternateExchange=alternateExchange,
arg::arguments=queueOptions);
//'default' binding:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org