[AMQ-7394] use canRecoveryNextMessage to base blocking on shared usage, the existing fix regressed AMQ5266Test

This commit is contained in:
gtully 2020-05-20 15:15:48 +01:00
parent 8bedeb4b9b
commit 96fa8458ce
1 changed files with 1 additions and 1 deletions

View File

@ -367,7 +367,7 @@ public class JDBCMessageStore extends AbstractMessageStore {
@Override @Override
public boolean recoverMessage(long sequenceId, byte[] data) throws Exception { public boolean recoverMessage(long sequenceId, byte[] data) throws Exception {
if (listener.hasSpace()) { if (listener.canRecoveryNextMessage()) {
Message msg = (Message) wireFormat.unmarshal(new ByteSequence(data)); Message msg = (Message) wireFormat.unmarshal(new ByteSequence(data));
msg.getMessageId().setBrokerSequenceId(sequenceId); msg.getMessageId().setBrokerSequenceId(sequenceId);
msg.getMessageId().setFutureOrSequenceLong(sequenceId); msg.getMessageId().setFutureOrSequenceLong(sequenceId);