This is an automated email from the ASF dual-hosted git repository.
rgodfrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git
The following commit(s) were added to refs/heads/main by this push:
new 245e4cea9d QPID-8750 : AsyncAutoCommitTransaction can enqueue messages
out of order when a queue's messageDurability forces storage of non-persistent
messages
245e4cea9d is described below
commit 245e4cea9de11725294c899fbcee8a56d5baab7b
Author: Rob Godfrey <[email protected]>
AuthorDate: Sun Aug 16 13:19:09 2026 +0200
QPID-8750 : AsyncAutoCommitTransaction can enqueue messages out of order
when a queue's messageDurability forces storage of non-persistent messages
With thanks to Marco Geri
---
.../org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
a/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java
b/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java
index 5445c18b97..de429b920c 100755
---
a/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java
+++
b/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java
@@ -202,7 +202,8 @@ public class AsyncAutoCommitTransaction implements
ServerTransaction
{
CompletableFuture<Void> future;
final MessageEnqueueRecord enqueueRecord;
- if(queue.getMessageDurability().persist(message.isPersistent()))
+ boolean persist =
queue.getMessageDurability().persist(message.isPersistent());
+ if(persist)
{
LOGGER.debug("Enqueue of message number {} to transaction log.
Queue : {}", message.getMessageNumber(), queue.getName());
@@ -230,7 +231,7 @@ public class AsyncAutoCommitTransaction implements
ServerTransaction
{
underlying.onRollback();
}
- }, message.isPersistent());
+ }, persist);
postTransactionAction = null;
}
finally
@@ -285,7 +286,8 @@ public class AsyncAutoCommitTransaction implements
ServerTransaction
}
CompletableFuture<Void> future;
- if (txn != null)
+ final boolean persist = txn != null;
+ if (persist)
{
future = txn.commitTranAsync(null);
txn = null;
@@ -311,7 +313,7 @@ public class AsyncAutoCommitTransaction implements
ServerTransaction
{
underlying.onRollback();
}
- }, message.isPersistent());
+ }, persist);
postTransactionAction = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]