diff options
author | Gordon Sim <gsim@apache.org> | 2009-01-05 20:51:41 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-01-05 20:51:41 +0000 |
commit | 14a032e343cf5875f4e3978191999d08dc0a5195 (patch) | |
tree | f027518a8de0057c30da792d8cdbb545720fa693 /qpid/cpp/src | |
parent | 8b88af239285ae9a36b07d816384a133d466da2e (diff) | |
download | qpid-python-14a032e343cf5875f4e3978191999d08dc0a5195.tar.gz |
Reduce log level from warning to info as (a) its not necessarily a bad thing at all and (b) the default logging level is now at notice+
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@731710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/qpid/broker/DirectExchange.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/broker/DirectExchange.cpp b/qpid/cpp/src/qpid/broker/DirectExchange.cpp index 9976167fa9..d1d9ad07e4 100644 --- a/qpid/cpp/src/qpid/broker/DirectExchange.cpp +++ b/qpid/cpp/src/qpid/broker/DirectExchange.cpp @@ -33,6 +33,7 @@ namespace const std::string qpidFedOp("qpid.fed.op"); const std::string qpidFedTags("qpid.fed.tags"); const std::string qpidFedOrigin("qpid.fed.origin"); +const std::string qpidExclusiveBinding("qpid.exclusive-binding"); const std::string fedOpBind("B"); const std::string fedOpUnbind("U"); @@ -56,15 +57,25 @@ DirectExchange::DirectExchange(const string& _name, bool _durable, bool DirectExchange::bind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* args) { - string fedOp(args ? args->getAsString(qpidFedOp) : fedOpBind); - string fedTags(args ? args->getAsString(qpidFedTags) : ""); - string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); + string fedOp(fedOpBind); + string fedTags; + string fedOrigin; + bool exclusiveBinding = false; + if (args) { + fedOp = args->getAsString(qpidFedOp); + fedTags = args->getAsString(qpidFedTags); + fedOrigin = args->getAsString(qpidFedOrigin); + exclusiveBinding = args->get(qpidExclusiveBinding); + } + bool propagate = false; if (args == 0 || fedOp.empty() || fedOp == fedOpBind) { Mutex::ScopedLock l(lock); Binding::shared_ptr b(new Binding(routingKey, queue, this, FieldTable(), fedOrigin)); BoundKey& bk = bindings[routingKey]; + if (exclusiveBinding) bk.queues.clear(); + if (bk.queues.add_unless(b, MatchQueue(queue))) { propagate = bk.fedBinding.addOrigin(fedOrigin); if (mgmtExchange != 0) { @@ -138,7 +149,8 @@ void DirectExchange::route(Deliverable& msg, const string& routingKey, const Fie } if(!count){ - QPID_LOG(warning, "DirectExchange " << getName() << " could not route message with key " << routingKey); + QPID_LOG(info, "DirectExchange " << getName() << " could not route message with key " << routingKey + << "; no matching binding found"); if (mgmtExchange != 0) { mgmtExchange->inc_msgDrops(); mgmtExchange->inc_byteDrops(msg.contentSize()); |