Class RedisChannelPriorityMessageStore

java.lang.Object
org.springframework.integration.redis.store.RedisChannelMessageStore
org.springframework.integration.redis.store.RedisChannelPriorityMessageStore
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.integration.store.BasicMessageGroupStore, org.springframework.integration.store.ChannelMessageStore, org.springframework.integration.store.PriorityCapableChannelMessageStore

public class RedisChannelPriorityMessageStore extends RedisChannelMessageStore implements org.springframework.integration.store.PriorityCapableChannelMessageStore
Specialized Redis PriorityCapableChannelMessageStore that uses lists to back a QueueChannel. Messages are removed in priority order (IntegrationMessageHeaderAccessor.PRIORITY). Priorities 0-9 are supported (9 the highest); invalid priority values are treated with the same priority (none) as messages with no priority header (retrieved after any messages that have a priority).

Requires that groupId is a String.

Since:
4.0
  • Constructor Details

    • RedisChannelPriorityMessageStore

      public RedisChannelPriorityMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
  • Method Details

    • isPriorityEnabled

      public boolean isPriorityEnabled()
      Specified by:
      isPriorityEnabled in interface org.springframework.integration.store.PriorityCapableChannelMessageStore
    • messageGroupSize

      @ManagedAttribute public int messageGroupSize(Object groupId)
      Specified by:
      messageGroupSize in interface org.springframework.integration.store.BasicMessageGroupStore
      Overrides:
      messageGroupSize in class RedisChannelMessageStore
    • getMessageGroup

      public org.springframework.integration.store.MessageGroup getMessageGroup(Object groupId)
      Specified by:
      getMessageGroup in interface org.springframework.integration.store.BasicMessageGroupStore
      Overrides:
      getMessageGroup in class RedisChannelMessageStore
    • addMessageToGroup

      public org.springframework.integration.store.MessageGroup addMessageToGroup(Object groupId, org.springframework.messaging.Message<?> message)
      Specified by:
      addMessageToGroup in interface org.springframework.integration.store.BasicMessageGroupStore
      Overrides:
      addMessageToGroup in class RedisChannelMessageStore
    • pollMessageFromGroup

      public org.springframework.messaging.Message<?> pollMessageFromGroup(Object groupId)
      Specified by:
      pollMessageFromGroup in interface org.springframework.integration.store.BasicMessageGroupStore
      Overrides:
      pollMessageFromGroup in class RedisChannelMessageStore
    • getMessageGroupCount

      @ManagedAttribute public int getMessageGroupCount()
      Overrides:
      getMessageGroupCount in class RedisChannelMessageStore
    • removeMessageGroup

      public void removeMessageGroup(Object groupId)
      Specified by:
      removeMessageGroup in interface org.springframework.integration.store.BasicMessageGroupStore
      Overrides:
      removeMessageGroup in class RedisChannelMessageStore
    • getMessageCountForAllMessageGroups

      @ManagedAttribute public int getMessageCountForAllMessageGroups()
      Overrides:
      getMessageCountForAllMessageGroups in class RedisChannelMessageStore