diff options
| author | Alan Conway <aconway@apache.org> | 2007-11-07 21:01:26 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-11-07 21:01:26 +0000 |
| commit | 5c952db3bb1fad90ea4f5de985453d13dce45e7c (patch) | |
| tree | 0670b6a55a21b099bfe7ef283e3230782b592ce8 /cpp/src/qpid/client | |
| parent | 0a6761806f55ad18d65e2c22cd18a08e2ec5a149 (diff) | |
| download | qpid-python-5c952db3bb1fad90ea4f5de985453d13dce45e7c.tar.gz | |
auto-ack support for perftest.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592897 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client')
| -rw-r--r-- | cpp/src/qpid/client/LocalQueue.cpp | 7 | ||||
| -rw-r--r-- | cpp/src/qpid/client/SubscriptionManager.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp index 09bf1e055a..7fbe4a053e 100644 --- a/cpp/src/qpid/client/LocalQueue.cpp +++ b/cpp/src/qpid/client/LocalQueue.cpp @@ -35,8 +35,11 @@ Message LocalQueue::pop() { if (!queue) throw ClosedException(); FrameSet::shared_ptr content = queue->pop(); - if (content->isA<MessageTransferBody>()) - return Message(*content, session); + if (content->isA<MessageTransferBody>()) { + Message m(*content, session); + autoAck.ack(m); + return m; + } else throw CommandInvalidException( QPID_MSG("Unexpected method: " << content->getMethod())); diff --git a/cpp/src/qpid/client/SubscriptionManager.cpp b/cpp/src/qpid/client/SubscriptionManager.cpp index fc65843643..478b8438c2 100644 --- a/cpp/src/qpid/client/SubscriptionManager.cpp +++ b/cpp/src/qpid/client/SubscriptionManager.cpp @@ -41,8 +41,8 @@ void SubscriptionManager::subscribe( MessageListener& listener, const std::string& q, const std::string& t) { std::string tag=t.empty() ? q:t; - session.messageSubscribe(arg::queue=q, arg::destination=tag); dispatcher.listen(tag, &listener); + session.messageSubscribe(arg::queue=q, arg::destination=tag); setFlowControl(tag, messages, bytes, window); } |
