diff --git a/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java b/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java index af85ca80afa..aff01d6c250 100644 --- a/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java +++ b/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java @@ -949,14 +949,6 @@ private boolean onDepage(final int pageId, final SimpleString destination, final final long transactionIdDuringPaging = pagedMessage.getTransactionID(); - postOffice.route(message, depageTransaction); - - // This means the page is duplicated. So we need to ignore this - if (depageTransaction.getState() == State.ROLLBACK_ONLY) - { - break; - } - PageTransactionInfo pageUserTransaction = null; if (transactionIdDuringPaging >= 0) @@ -1003,6 +995,15 @@ private boolean onDepage(final int pageId, final SimpleString destination, final } + postOffice.route(message, depageTransaction); + + // This means the page is duplicated. So we need to ignore this + if (depageTransaction.getState() == State.ROLLBACK_ONLY) + { + break; + } + + // Update information about transactions // This needs to be done after routing because of duplication detection if (pageUserTransaction != null && message.isDurable())