diff options
| author | Gordon Sim <gsim@apache.org> | 2009-01-20 13:30:08 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2009-01-20 13:30:08 +0000 |
| commit | afefc741a9ad4c6299a47805a45a1c81a048e0a2 (patch) | |
| tree | 70120255a090b5def48b4f5c72d2c1004841772d /cpp/src/qpid/framing/Proxy.cpp | |
| parent | 1d5e6b196da4ba618ebc91054ee77e6c3c005333 (diff) | |
| download | qpid-python-afefc741a9ad4c6299a47805a45a1c81a048e0a2.tar.gz | |
QPID-1567: added 'exactly-once' guarantee to asynchronous replication of queue state
* altered replication protocol to detect and eliminate duplicates
* added support for acknowledged transfer over inter-broker bridges
* added option to qpid-route to control this
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736018 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/Proxy.cpp')
| -rw-r--r-- | cpp/src/qpid/framing/Proxy.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/qpid/framing/Proxy.cpp b/cpp/src/qpid/framing/Proxy.cpp index 6b37fb368d..6c3724bcdb 100644 --- a/cpp/src/qpid/framing/Proxy.cpp +++ b/cpp/src/qpid/framing/Proxy.cpp @@ -18,15 +18,21 @@ #include "Proxy.h" #include "AMQFrame.h" +#include "AMQMethodBody.h" +#include "qpid/log/Statement.h" namespace qpid { namespace framing { -Proxy::Proxy(FrameHandler& h) : out(&h) {} +Proxy::Proxy(FrameHandler& h) : out(&h), sync(false) {} Proxy::~Proxy() {} void Proxy::send(const AMQBody& b) { + if (sync) { + const AMQMethodBody* m = dynamic_cast<const AMQMethodBody*>(&b); + if (m) m->setSync(sync); + } AMQFrame f(b); out->handle(f); } @@ -39,4 +45,7 @@ FrameHandler& Proxy::getHandler() { return *out; } void Proxy::setHandler(FrameHandler& f) { out=&f; } +Proxy::ScopedSync::ScopedSync(Proxy& p) : proxy(p) { proxy.sync = true; } +Proxy::ScopedSync::~ScopedSync() { proxy.sync = false; } + }} // namespace qpid::framing |
