mirror of https://github.com/apache/activemq.git
[AMQ-7394] Simple first fix to use listener.hasSpace() when recovering message from JDBC message store
This commit is contained in:
parent
578051fdea
commit
dcd3d5db3f
|
@ -367,13 +367,17 @@ public class JDBCMessageStore extends AbstractMessageStore {
|
|||
|
||||
@Override
|
||||
public boolean recoverMessage(long sequenceId, byte[] data) throws Exception {
|
||||
Message msg = (Message)wireFormat.unmarshal(new ByteSequence(data));
|
||||
if (listener.hasSpace()) {
|
||||
Message msg = (Message) wireFormat.unmarshal(new ByteSequence(data));
|
||||
msg.getMessageId().setBrokerSequenceId(sequenceId);
|
||||
msg.getMessageId().setFutureOrSequenceLong(sequenceId);
|
||||
msg.getMessageId().setEntryLocator(sequenceId);
|
||||
listener.recoverMessage(msg);
|
||||
trackLastRecovered(sequenceId, msg.getPriority());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue