// If we could guarantee that the key and exchange are immutable,
// then we could have stuck them directly into the index,
// HawtDB could then eliminate the need to marshal and un-marshal
// in some cases. But since we can.. we are going to force
// early marshaling.
final Buffer keyBuffer = marshaller.marshallKey(key);
final Buffer exchangeBuffer = marshaller.marshallExchange(camelContext, exchange);
Buffer rc = hawtDBFile.execute(new Work<Buffer>() {
public Buffer execute(Transaction tx) {
Index<Buffer, Buffer> index = hawtDBFile.getRepositoryIndex(tx, repositoryName, true);
return index.put(keyBuffer, exchangeBuffer);
}