spring-projects/spring-integration — pull request #1293 by artembilan (2014-10-09 20:29:10+00:00)
Title: INT-3387: Add Lazy-Load for PersistenceMGS

JIRA: https://jira.spring.io/browse/INT-3387

* Introduce `AbstractMessageGroupStore.PersistentMessageGroup` and `AbstractMessageGroupStore.PersistentMessageGroup.PersistentCollection`
to achieve two-level Lazy-Load algorithm
* Add `AbstractMessageGroupStore` `protected abstract Collection> getMessagesForGroup(Object groupId);` to be used to lazy-load `PersistentCollection`
* Provide some refactoring for `Correlation` Components to achieve better performance with lazy-load
* Refactoring for the `AbstractKeyValueMessageStore` to avoid extra load of messages
* Introduce some **breaking** change to the `MessageGroupMetadata`
* Tested with 1000 messages with MongoDB with `sequenceAware = true`, when entire group is loaded for each message, and with `release-strategy-expression="size() == 1000"`.
Looks like performance is growing exponentially, because in case of `sequenceAware = false` we load whole group only once for the last message.