diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2012-05-04 15:39:19 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2012-05-04 15:39:19 +0000 |
| commit | 633c33f224f3196f3f9bd80bd2e418d8143fea06 (patch) | |
| tree | 1391da89470593209466df68c0b40b89c14963b1 /cpp/src/qpid/replication/ReplicationExchange.cpp | |
| parent | c73f9286ebff93a6c8dbc29cf05e258c4b55c976 (diff) | |
| download | qpid-python-633c33f224f3196f3f9bd80bd2e418d8143fea06.tar.gz | |
QPID-3858: Updated branch - merged from trunk r.1333987
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1334037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/replication/ReplicationExchange.cpp')
| -rw-r--r-- | cpp/src/qpid/replication/ReplicationExchange.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/src/qpid/replication/ReplicationExchange.cpp b/cpp/src/qpid/replication/ReplicationExchange.cpp index 89a2bf516d..66f4f14d0c 100644 --- a/cpp/src/qpid/replication/ReplicationExchange.cpp +++ b/cpp/src/qpid/replication/ReplicationExchange.cpp @@ -50,8 +50,9 @@ ReplicationExchange::ReplicationExchange(const std::string& name, bool durable, std::string ReplicationExchange::getType() const { return typeName; } -void ReplicationExchange::route(Deliverable& msg, const std::string& /*routingKey*/, const FieldTable* args) +void ReplicationExchange::route(Deliverable& msg) { + const FieldTable* args = msg.getMessage().getApplicationHeaders(); if (mgmtExchange != 0) { mgmtExchange->inc_msgReceives(); mgmtExchange->inc_byteReceives(msg.contentSize()); @@ -59,7 +60,13 @@ void ReplicationExchange::route(Deliverable& msg, const std::string& /*routingKe if (args) { int eventType = args->getAsInt(REPLICATION_EVENT_TYPE); if (eventType) { - if (isDuplicate(args)) return; + if (isDuplicate(args)) { + if (mgmtExchange != 0) { + mgmtExchange->inc_msgDrops(); + mgmtExchange->inc_byteDrops(msg.contentSize()); + } + return; + } switch (eventType) { case ENQUEUE: handleEnqueueEvent(args, msg); |
