Merge pull request #495 from jbonofre/AMQ-7425

[AMQ-7425] Simple fix to be sure to delete message from JDBC message store
This commit is contained in:
Jean-Baptiste Onofré 2020-03-03 17:14:23 +01:00 committed by GitHub
commit e20ef34ae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,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];