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 | 6d0e02499ec8caea2c2559207185cb9e6174dd8d (patch) | |
tree | 53caece963435794054fbaea175ed78abab8251f /cpp/src | |
parent | ba666188893ad7430d93b69fb40822aa094624fd (diff) | |
download | qpid-python-6d0e02499ec8caea2c2559207185cb9e6174dd8d.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/qpid@731710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/DirectExchange.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/DirectExchange.cpp b/cpp/src/qpid/broker/DirectExchange.cpp index 9976167fa9..d1d9ad07e4 100644 --- a/cpp/src/qpid/broker/DirectExchange.cpp +++ b/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()); |