diff options
| author | Alan Conway <aconway@apache.org> | 2007-11-07 16:06:31 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-11-07 16:06:31 +0000 |
| commit | d19657d82321b2b5e2cac386c49aa99f82b976fb (patch) | |
| tree | eceb3790181d8b058e207a0847c35024856325b0 /cpp/src/qpid/client/Channel.cpp | |
| parent | 5bec8a4a978290a8dd710870a04bd09e9f493c26 (diff) | |
| download | qpid-python-d19657d82321b2b5e2cac386c49aa99f82b976fb.tar.gz | |
Added LocalQueue subscriptions. LocalQueue::pop() provides a "pull"
alternative to the MessageListener::received() "push" API.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/Channel.cpp')
| -rw-r--r-- | cpp/src/qpid/client/Channel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/Channel.cpp b/cpp/src/qpid/client/Channel.cpp index 9246ead44e..2d43d300dd 100644 --- a/cpp/src/qpid/client/Channel.cpp +++ b/cpp/src/qpid/client/Channel.cpp @@ -179,7 +179,7 @@ void Channel::cancel(const std::string& tag, bool synch) { bool Channel::get(Message& msg, const Queue& _queue, AckMode ackMode) { string tag = "get-handler"; ScopedDivert handler(tag, session.execution().getDemux()); - Demux::Queue& incoming = handler.getQueue(); + Demux::QueuePtr incoming = handler.getQueue(); session.messageSubscribe(destination=tag, queue=_queue.getName(), confirmMode=(ackMode == NO_ACK ? 0 : 1)); session.messageFlow(tag, 1/*BYTES*/, 0xFFFFFFFF); @@ -189,7 +189,7 @@ bool Channel::get(Message& msg, const Queue& _queue, AckMode ackMode) { session.messageCancel(tag); FrameSet::shared_ptr p; - if (incoming.tryPop(p)) { + if (incoming->tryPop(p)) { msg.populate(*p); if (ackMode == AUTO_ACK) msg.acknowledge(session, false, true); return true; @@ -265,7 +265,7 @@ void Channel::run() { QPID_LOG(warning, "Dropping unsupported message type: " << content->getMethod()); } } - } catch (const sys::QueueClosed&) {} + } catch (const ClosedException&) {} } }} |
