summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-08-20 11:32:11 +0000
committerGordon Sim <gsim@apache.org>2010-08-20 11:32:11 +0000
commit145087188c7bd24175cbddbe1156433a4b498abc (patch)
tree8d0ff348fe1f068308b6516f6f31874d3d4f3fda /cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
parent91a4eda9bfa588f1d017c218ac2bcc9713338ef2 (diff)
downloadqpid-python-145087188c7bd24175cbddbe1156433a4b498abc.tar.gz
QPID-2807: Allow per message acknowledgement
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@987459 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/amqp0_10/SessionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/amqp0_10/SessionImpl.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
index 800c3269b9..1086146b0d 100644
--- a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
+++ b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
@@ -112,6 +112,15 @@ void SessionImpl::release(qpid::messaging::Message& m)
execute1<Release>(m);
}
+void SessionImpl::acknowledge(qpid::messaging::Message& m)
+{
+ //Should probably throw an exception on failure here, or indicate
+ //it through a return type at least. Failure means that the
+ //message may be redelivered; i.e. the application cannot delete
+ //any state necessary for preventing reprocessing of the message
+ execute1<Acknowledge1>(m);
+}
+
void SessionImpl::close()
{
if (hasError()) {
@@ -456,6 +465,12 @@ void SessionImpl::acknowledgeImpl()
if (!transactional) incoming.accept();
}
+void SessionImpl::acknowledgeImpl(qpid::messaging::Message& m)
+{
+ ScopedLock l(lock);
+ if (!transactional) incoming.accept(MessageImplAccess::get(m).getInternalId());
+}
+
void SessionImpl::rejectImpl(qpid::messaging::Message& m)
{
SequenceSet set;