Skip to content

Provide access to stored messages from the ChannelMessageStore API #3429

Open

Description

@mrnst

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);
}

Activity

  1. added
    status: waiting-for-triage
    on Nov 11, 2020
  2. 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
  3. added and removed
    status: waiting-for-triage
    on Nov 12, 2020
  4. added this to the 6.0.x milestone on Nov 12, 2020
  5. artembilan commented on Jan 19, 2021

    @artembilan
    Member

    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.

  6. modified the milestones: 6.0.x, on Jan 17, 2023
  7. modified the milestones: , Backlog on Apr 13, 2023
  8. artembilan commented on Oct 23, 2026

    @artembilan
    Member

    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.

    Thanks

  9. added 2 commits that reference this issue on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions