Hi there,
I'm wondering if there is any reason why the ClaimCheckOutTransformer uses MessageStore.getMessage instead of MessageStore.removeMessage to retrieve the row? MessageStore.removeMessage is supposed to return the message as well.
It ends up, for JdbcMessageStore anyways, retrieving the row twice (and performing the row mapping twice). For large payloads, this deserialization might take some time.
Instead of:
Couldn't it be:Code:Message<?> retrievedMessage = this.messageStore.getMessage(id); Assert.notNull(retrievedMessage, "unable to locate Message for ID: " + id + " within MessageStore [" + this.messageStore + "]"); if (this.removeMessage) { this.messageStore.removeMessage(id); if (logger.isDebugEnabled()) { logger.debug("Removed Message with claim-check '" + id + "' from the MessageStore."); } }
Code:Message<?> retrievedMessage; if (this.removeMessage) { retrievedMessage = this.messageStore.removeMessage(id); if (logger.isDebugEnabled()) { logger.debug("Removed Message with claim-check '" + id + "' from the MessageStore."); } } else { retrievedMessage = this.messageStore.getMessage(id); } Assert.notNull(retrievedMessage, "unable to locate Message for ID: " + id + " within MessageStore [" + this.messageStore + "]")


Reply With Quote
