diff options
author | Andrew Stitcher <astitcher@apache.org> | 2012-03-05 19:12:32 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2012-03-05 19:12:32 +0000 |
commit | 5c7af69acdf2c9702e765418b986d4fb15e7aea3 (patch) | |
tree | 088dc721afa16cbfa366126f985749c542e8a496 /cpp/src/qpid/management/ManagementDirectExchange.cpp | |
parent | 9d0f44cd53581e70390b41968109739e0171d07d (diff) | |
download | qpid-python-5c7af69acdf2c9702e765418b986d4fb15e7aea3.tar.gz |
QPID-3883: Using application headers in messages causes a very large slowdown
Change Exchange route interface not to require a fieldtable
- Exchanges that actually use the fieldtable for routing
need to extract it directly from the message themselves.
This avoids the need to extract the fieldtable from the message
unnecessarily.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1297183 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/management/ManagementDirectExchange.cpp')
-rw-r--r-- | cpp/src/qpid/management/ManagementDirectExchange.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/management/ManagementDirectExchange.cpp b/cpp/src/qpid/management/ManagementDirectExchange.cpp index 1d5f8bbd6b..312eacf462 100644 --- a/cpp/src/qpid/management/ManagementDirectExchange.cpp +++ b/cpp/src/qpid/management/ManagementDirectExchange.cpp @@ -40,17 +40,17 @@ ManagementDirectExchange::ManagementDirectExchange(const std::string& _name, DirectExchange(_name, _durable, _args, _parent, b), managementAgent(0) {} -void ManagementDirectExchange::route(Deliverable& msg, - const string& routingKey, - const FieldTable* args) +void ManagementDirectExchange::route(Deliverable& msg) { bool routeIt = true; + const string& routingKey = msg.getMessage().getRoutingKey(); + const FieldTable* args = msg.getMessage().getApplicationHeaders(); if (managementAgent) routeIt = managementAgent->dispatchCommand(msg, routingKey, args, false, qmfVersion); if (routeIt) - DirectExchange::route(msg, routingKey, args); + DirectExchange::route(msg); } void ManagementDirectExchange::setManagmentAgent(ManagementAgent* agent, int qv) |