From 91cc588f59939d2a8ca425e587eaaf3201bd266b Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Tue, 8 Mar 2011 16:06:39 +0000 Subject: QPID-2732 The reliability mode is now used on the producer side to determine replay. Any messages transfers sent to a destination marked unreliable will not be added to the replay buffer. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1079408 13f79535-47bb-0310-9956-ffa450edef68 --- .../common/src/main/java/org/apache/qpid/transport/Session.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qpid/java/common/src') diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java index 242c7f2b0d..d961507382 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java @@ -664,7 +664,12 @@ public class Session extends SessionInvoker { sessionCommandPoint(0, 0); } - if ((!closing && !transacted && m instanceof MessageTransfer) || m.hasCompletionListener()) + + boolean replayTransfer = !closing && !transacted && + m instanceof MessageTransfer && + ! m.isUnreliable(); + + if ((replayTransfer) || m.hasCompletionListener()) { commands[mod(next, commands.length)] = m; commandBytes += m.getBodySize(); -- cgit v1.2.1