spring-projects/spring-integration — pull request #1136 by artembilan (2014-04-23 13:22:13+00:00)
Title: INT-3382: Add MG `LazyLoadMessagesInterceptor`

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

* Add `BasicMessageGroupStore#getMessageGroupMetadata` to return `MessageGroup` without messages and just with common info
* Add `MessageGroupStore#getOneMessageFromGroup` to return just only one message to cover `MessageGroup#getOne()`
* Provide correct optimal implementation for all `BasicMessageGroupStore` and `MessageGroupStore`
* Proxy `MessageGroup` with new `LazyLoadMessagesInterceptor` from `BasicMessageGroupStore#getMessageGroupMetadata` to allow to get deal with real messages on demand
* Change `AbstractCorrelatingMessageHandler` to use new `BasicMessageGroupStore#getMessageGroupMetadata`

To have good performance for persistent `CorrelationHandler` with that `MessageGroup` proxy there is need to use custom `ReleaseStrategy` and don't use
`ExpressionEvaluatingReleaseStrategy` or `MethodInvokingReleaseStrategy`, which load `Collection>` immediately