diff options
| author | Gordon Sim <gsim@apache.org> | 2012-07-06 18:01:07 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2012-07-06 18:01:07 +0000 |
| commit | e34afae02c4e2cbc90ad3f3078091970882ad1f0 (patch) | |
| tree | e14e6bf451d0e8ec073620d4d9b4a7478b5d0ce0 /cpp/src/qpid | |
| parent | 1ce6e1d254c757a43658da7c6f1fe4591c693f1c (diff) | |
| download | qpid-python-e34afae02c4e2cbc90ad3f3078091970882ad1f0.tar.gz | |
QPID-4117: honour alternate-exchange option specified within x-declare for a link
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1358321 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/client/amqp0_10/AddressResolution.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp index a8f4fb5237..2627c178f9 100644 --- a/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp +++ b/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp @@ -241,6 +241,7 @@ class Subscription : public Exchange, public MessageSource const std::string actualType; const bool exclusiveQueue; const bool exclusiveSubscription; + const std::string alternateExchange; FieldTable queueOptions; FieldTable subscriptionOptions; Bindings bindings; @@ -507,7 +508,8 @@ Subscription::Subscription(const Address& address, const std::string& type) durable(Opt(address)/LINK/DURABLE), actualType(type.empty() ? (specifiedType.empty() ? TOPIC_EXCHANGE : specifiedType) : type), exclusiveQueue((Opt(address)/LINK/X_DECLARE/EXCLUSIVE).asBool(true)), - exclusiveSubscription((Opt(address)/LINK/X_SUBSCRIBE/EXCLUSIVE).asBool(exclusiveQueue)) + exclusiveSubscription((Opt(address)/LINK/X_SUBSCRIBE/EXCLUSIVE).asBool(exclusiveQueue)), + alternateExchange((Opt(address)/LINK/X_DECLARE/ALTERNATE_EXCHANGE).str()) { (Opt(address)/LINK/X_DECLARE/ARGUMENTS).collect(queueOptions); (Opt(address)/LINK/X_SUBSCRIBE/ARGUMENTS).collect(subscriptionOptions); @@ -568,7 +570,9 @@ void Subscription::subscribe(qpid::client::AsyncSession& session, const std::str //create subscription queue: session.queueDeclare(arg::queue=queue, arg::exclusive=exclusiveQueue, - arg::autoDelete=!reliable, arg::durable=durable, arg::arguments=queueOptions); + arg::autoDelete=!reliable, arg::durable=durable, + arg::alternateExchange=alternateExchange, + arg::arguments=queueOptions); //'default' binding: bindings.bind(session); //any explicit bindings: |
