summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ExchangeRegistry.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-05-06 17:52:03 +0000
committerAlan Conway <aconway@apache.org>2008-05-06 17:52:03 +0000
commit8d8a9162f7ba5a99a7c8b8b57aae860ab3028078 (patch)
treeaa17b9f56448a5280e13441a7b0473dd5faee283 /cpp/src/qpid/broker/ExchangeRegistry.cpp
parente4a3049c22b36171d204a8f84ddbcbf5accf797f (diff)
downloadqpid-python-8d8a9162f7ba5a99a7c8b8b57aae860ab3028078.tar.gz
From https://issues.apache.org/jira/browse/QPID-879 contributed by Jonathan Robie.
XML exchange allowing messages to be routed base on XQuery expressions. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@653854 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ExchangeRegistry.cpp')
-rw-r--r--cpp/src/qpid/broker/ExchangeRegistry.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/ExchangeRegistry.cpp b/cpp/src/qpid/broker/ExchangeRegistry.cpp
index 58d9d5efb8..c1eb5ff5a3 100644
--- a/cpp/src/qpid/broker/ExchangeRegistry.cpp
+++ b/cpp/src/qpid/broker/ExchangeRegistry.cpp
@@ -18,11 +18,16 @@
* under the License.
*
*/
+
+#include "config.h"
#include "ExchangeRegistry.h"
#include "DirectExchange.h"
#include "FanOutExchange.h"
#include "HeadersExchange.h"
#include "TopicExchange.h"
+#ifdef HAVE_XML
+#include "XmlExchange.h"
+#endif
#include "qpid/management/ManagementExchange.h"
#include "qpid/framing/reply_exceptions.h"
@@ -55,7 +60,13 @@ pair<Exchange::shared_ptr, bool> ExchangeRegistry::declare(const string& name, c
exchange = Exchange::shared_ptr(new HeadersExchange(name, durable, args, parent));
}else if (type == ManagementExchange::typeName) {
exchange = Exchange::shared_ptr(new ManagementExchange(name, durable, args, parent));
- }else{
+ }
+#ifdef HAVE_XML
+ else if (type == XmlExchange::typeName) {
+ exchange = Exchange::shared_ptr(new XmlExchange(name, durable, args, parent));
+ }
+#endif
+ else{
throw UnknownExchangeTypeException();
}
exchanges[name] = exchange;