diff options
author | Alan Conway <aconway@apache.org> | 2006-09-21 18:26:31 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2006-09-21 18:26:31 +0000 |
commit | 474ed3cf1e125360d26dad4376e106e8b48541ac (patch) | |
tree | 4f1043da7f03a5ec230539a62afac3fb0f0f0b73 /cpp/broker/src/SessionHandlerImpl.cpp | |
parent | 82e07bb30905feb2c11bb6d9f3624f976ab070a5 (diff) | |
download | qpid-python-474ed3cf1e125360d26dad4376e106e8b48541ac.tar.gz |
Implemented topic pattern matching for the TopicExchange.
Corrected default bindings to use the exchange named "" rather than
"amqp.direct".
Added python and unit tests for all of the above.
Minor improvements to testlib.py, also some tests for testlib itself.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@448624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/broker/src/SessionHandlerImpl.cpp')
-rw-r--r-- | cpp/broker/src/SessionHandlerImpl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/broker/src/SessionHandlerImpl.cpp b/cpp/broker/src/SessionHandlerImpl.cpp index a75b8fcf0f..872e6f124a 100644 --- a/cpp/broker/src/SessionHandlerImpl.cpp +++ b/cpp/broker/src/SessionHandlerImpl.cpp @@ -256,7 +256,7 @@ void SessionHandlerImpl::QueueHandlerImpl::declare(u_int16_t channel, u_int16_t if (queue_created.second) { // This is a new queue parent->channels[channel]->setDefaultQueue(queue); //add default binding: - parent->exchanges->get("amq.direct")->bind(queue, name, 0); + parent->exchanges->getDefault()->bind(queue, name, 0); if(exclusive){ parent->exclusiveQueues.push_back(queue); } else if(autoDelete){ @@ -280,7 +280,7 @@ void SessionHandlerImpl::QueueHandlerImpl::bind(u_int16_t channel, u_int16_t tic Queue::shared_ptr queue = parent->getQueue(queueName, channel); Exchange* exchange = parent->exchanges->get(exchangeName); if(exchange){ - if(routingKey.size() == 0 && queueName.size() == 0) routingKey = queue->getName(); + if(routingKey.empty() && queueName.empty()) routingKey = queue->getName(); exchange->bind(queue, routingKey, &arguments); if(!nowait) parent->client.getQueue().bindOk(channel); }else{ @@ -361,7 +361,7 @@ void SessionHandlerImpl::BasicHandlerImpl::publish(u_int16_t channel, u_int16_t string& exchange, string& routingKey, bool mandatory, bool immediate){ - Message* msg = new Message(parent, exchange.length() ? exchange : "amq.direct", routingKey, mandatory, immediate); + Message* msg = new Message(parent, exchange, routingKey, mandatory, immediate); parent->channels[channel]->handlePublish(msg); } |