You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide access to stored messages from the ChannelMessageStore API #3429
It should be possible to use the public API of ChannelMessageStore to get access to stored messages without consuming those messages.
The current implementation always yields an empty message group:
/**
* Not fully used. Only wraps the provided group id.
*/
@Override
public MessageGroup getMessageGroup(Object groupId) {
return getMessageGroupFactory().create(groupId);
}
changed the title [-]Provide access to stored messages from the API of MongoDbChannelMessageStore[/-][+]Provide access to stored messages from the ChannelMessageStore API[/+]on Nov 12, 2020
While implementing #3446 I've noticed that MongoDbChannelMessageStore extends AbstractConfigurableMongoDbMessageStore with its lazyLoadMessageGroups = true by default and give us a full access to the stored messages, either via getMessagesForGroup(Object groupId) or new streamMessagesForGroup(Object groupId).
So, we probably need just pull a couple MessageGroupStore method up into BasicMessageGroupStore or have their respective implementation in the ChannelMessageStore. And also revise a messageGroupFactory to be lazy for the JdbcChannelMessageStore and RedisChannelMessageStore, respectively.
Although it's probably still won't be so straightforward without any breaking changes. So, still 6.0.
I think to be consistent with AbstractConfigurableMongoDbMessageStore current impl, we might really like to have those getMessagesForGroup() / streamMessagesForGroup() in the BasicMessageGroupStore as I stated in my other comment here.
Activity
[-]Provide access to stored messages from the API of MongoDbChannelMessageStore[/-][+]Provide access to stored messages from the ChannelMessageStore API[/+]artembilan commentedon Jan 19, 2021
While implementing #3446 I've noticed that
MongoDbChannelMessageStore extends AbstractConfigurableMongoDbMessageStorewith itslazyLoadMessageGroups = trueby default and give us a full access to the stored messages, either viagetMessagesForGroup(Object groupId)or newstreamMessagesForGroup(Object groupId).So, we probably need just pull a couple
MessageGroupStoremethod up intoBasicMessageGroupStoreor have their respective implementation in theChannelMessageStore. And also revise amessageGroupFactoryto belazyfor theJdbcChannelMessageStoreandRedisChannelMessageStore, respectively.Although it's probably still won't be so straightforward without any breaking changes. So, still
6.0.artembilan commentedon Oct 23, 2026
I think to be consistent with
AbstractConfigurableMongoDbMessageStorecurrent impl, we might really like to have thosegetMessagesForGroup() / streamMessagesForGroup()in theBasicMessageGroupStoreas I stated in my other comment here.Thanks
spring-projectsGH-3429: Lazily load Redis channel message groups
spring-projectsGH-3429: Align version and contributor metadata