This commit is contained in:
gtully 2014-09-15 15:59:00 +01:00
parent 8ab9a56d35
commit a0c42a61dd
1 changed files with 4 additions and 1 deletions

View File

@ -1369,13 +1369,16 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
Long id = sd.messageIdIndex.get(tx, command.getMessageId());
if (id != null) {
sd.orderIndex.put(
MessageKeys previousKeys = sd.orderIndex.put(
tx,
command.getPrioritySupported() ? command.getPriority() : javax.jms.Message.DEFAULT_PRIORITY,
id,
new MessageKeys(command.getMessageId(), location)
);
sd.locationIndex.put(tx, location, id);
if(previousKeys != null) {
sd.locationIndex.remove(tx, previousKeys.location);
}
} else {
LOG.warn("Non existent message update attempt rejected. Destination: {}://{}, Message id: {}", command.getDestination().getType(), command.getDestination().getName(), command.getMessageId());
}