sd.trackPendingAddComplete(seq);
}
}
void updateIndex(Transaction tx, KahaUpdateMessageCommand updateMessageCommand, Location location) throws IOException {
KahaAddMessageCommand command = updateMessageCommand.getMessage();
StoredDestination sd = getStoredDestination(command.getDestination(), tx);
Long id = sd.messageIdIndex.get(tx, command.getMessageId());
if (id != null) {
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);
}
metadata.lastUpdate = location;
} else {
LOG.warn("Non existent message update attempt rejected. Destination: {}://{}, Message id: {}", command.getDestination().getType(), command.getDestination().getName(), command.getMessageId());
}
}