Interface BasicMessageGroupStore

All Known Subinterfaces:
ChannelMessageStore, MessageGroupStore, PriorityCapableChannelMessageStore
All Known Implementing Classes:
AbstractBatchingMessageGroupStore, AbstractKeyValueMessageStore, AbstractMessageGroupStore, SimpleMessageStore

public interface BasicMessageGroupStore
Defines a minimal message group store with basic capabilities.
Since:
4.0
  • Method Summary

    Modifier and Type Method Description
    MessageGroup addMessageToGroup​(java.lang.Object groupId, org.springframework.messaging.Message<?> message)
    Store a message with an association to a group id.
    MessageGroup getMessageGroup​(java.lang.Object groupId)
    Return all Messages currently in the MessageStore that were stored using addMessageToGroup(Object, Message) with this group id.
    int messageGroupSize​(java.lang.Object groupId)
    Return the size of this MessageGroup.
    org.springframework.messaging.Message<?> pollMessageFromGroup​(java.lang.Object groupId)
    Poll Message from this MessageGroup (in FIFO style if supported by the implementation) while also removing the polled Message.
    void removeMessageGroup​(java.lang.Object groupId)
    Remove the message group with this id.
  • Method Details

    • messageGroupSize

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

      MessageGroup getMessageGroup​(java.lang.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​(java.lang.Object groupId, org.springframework.messaging.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

      org.springframework.messaging.Message<?> pollMessageFromGroup​(java.lang.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​(java.lang.Object groupId)
      Remove the message group with this id.
      Parameters:
      groupId - The id of the group to remove.