@Override
public void updateMessage(Message message) throws IOException {
if (LOG.isTraceEnabled()) {
LOG.trace("updating: " + message.getMessageId() + " with deliveryCount: " + message.getRedeliveryCounter());
}
KahaUpdateMessageCommand updateMessageCommand = new KahaUpdateMessageCommand();
KahaAddMessageCommand command = new KahaAddMessageCommand();
command.setDestination(dest);
command.setMessageId(message.getMessageId().toProducerKey());
command.setPriority(message.getPriority());
command.setPrioritySupported(prioritizedMessages);
org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(message);
command.setMessage(new Buffer(packet.getData(), packet.getOffset(), packet.getLength()));
updateMessageCommand.setMessage(command);
store(updateMessageCommand, isEnableJournalDiskSyncs(), null, null);
}