Interface BasicMessageGroupStore

All Known Subinterfaces:
ChannelMessageStore, MessageGroupStore, PriorityCapableChannelMessageStore
All Known Implementing Classes:
AbstractBatchingMessageGroupStore, AbstractConfigurableMongoDbMessageStore, AbstractKeyValueMessageStore, AbstractMessageGroupStore, ConfigurableMongoDbMessageStore, GemfireMessageStore, JdbcChannelMessageStore, JdbcMessageStore, MongoDbChannelMessageStore, MongoDbMessageStore, RedisChannelMessageStore, RedisChannelPriorityMessageStore, RedisMessageStore, SimpleMessageStore

public interface BasicMessageGroupStore
Defines a minimal message group store with basic capabilities.
Since:
4.0
Author:
Gary Russell
  • Method Details

    • messageGroupSize

      @ManagedAttribute int messageGroupSize​(Object groupId)
      Return the size of this MessageGroup.
      Parameters:
      groupId - The group identifier.
      Returns:
      The size.
    • getMessageGroup

      MessageGroup getMessageGroup​(Object groupId)
      Return all Messages currently in the MessageStore that were stored using addMessageToGroup(Object, Message) with this group id.
      Parameters:
      groupId - The group identifier.
      Returns:
      A group of messages, empty if none exists for this key.
    • addMessageToGroup

      MessageGroup addMessageToGroup​(Object groupId, Message<?> message)
      Store a message with an association to a group id. This can be used to group messages together.
      Parameters:
      groupId - The group id to store the message under.
      message - A message.
      Returns:
      The message group.
    • pollMessageFromGroup

      Message<?> pollMessageFromGroup​(Object groupId)
      Poll Message from this MessageGroup (in FIFO style if supported by the implementation) while also removing the polled Message.
      Parameters:
      groupId - The group identifier.
      Returns:
      The message.
    • removeMessageGroup

      void removeMessageGroup​(Object groupId)
      Remove the message group with this id.
      Parameters:
      groupId - The id of the group to remove.