activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [activemq] branch activemq-5.15.x updated: [AMQ-7425] Simple fix to be sure to delete message from JDBC message store
Date Tue, 03 Mar 2020 16:15:34 GMT
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch activemq-5.15.x
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/activemq-5.15.x by this push:
     new cfdfbc5  [AMQ-7425] Simple fix to be sure to delete message from JDBC message store
cfdfbc5 is described below

commit cfdfbc57db3c4162c5fcb5e06c0c30b71e44fa93
Author: jbonofre <jbonofre@apache.org>
AuthorDate: Tue Mar 3 07:36:42 2020 +0100

    [AMQ-7425] Simple fix to be sure to delete message from JDBC message store
    
    (cherry picked from commit 4528b773c6863b7f3994bcdc9772b1fb2a98cfd0)
---
 .../src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
index 9435e5b..e6dcda3 100644
--- a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
+++ b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
@@ -250,7 +250,7 @@ public class JDBCMessageStore extends AbstractMessageStore {
     @Override
     public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException
{
 
-    	long seq = ack.getLastMessageId().getFutureOrSequenceLong() != null ?
+    	long seq = (ack.getLastMessageId().getFutureOrSequenceLong() != null && ((Long)
ack.getLastMessageId().getFutureOrSequenceLong() != 0)) ?
                 (Long) ack.getLastMessageId().getFutureOrSequenceLong() :
                 persistenceAdapter.getStoreSequenceIdForMessageId(context, ack.getLastMessageId(),
destination)[0];
 


Mime
View raw message