public class RedisChannelPriorityMessageStore extends RedisChannelMessageStore implements org.springframework.integration.store.PriorityCapableChannelMessageStore
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.
Constructor and Description |
---|
RedisChannelPriorityMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) |
Modifier and Type | Method and Description |
---|---|
org.springframework.integration.store.MessageGroup |
addMessageToGroup(java.lang.Object groupId,
org.springframework.messaging.Message<?> message) |
int |
getMessageCountForAllMessageGroups() |
org.springframework.integration.store.MessageGroup |
getMessageGroup(java.lang.Object groupId) |
int |
getMessageGroupCount() |
boolean |
isPriorityEnabled() |
int |
messageGroupSize(java.lang.Object groupId) |
org.springframework.messaging.Message<?> |
pollMessageFromGroup(java.lang.Object groupId) |
void |
removeMessageGroup(java.lang.Object groupId) |
afterPropertiesSet, getBeanName, getRedisTemplate, setBeanName, setValueSerializer
public RedisChannelPriorityMessageStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
public boolean isPriorityEnabled()
isPriorityEnabled
in interface org.springframework.integration.store.PriorityCapableChannelMessageStore
@ManagedAttribute public int messageGroupSize(java.lang.Object groupId)
messageGroupSize
in interface org.springframework.integration.store.BasicMessageGroupStore
messageGroupSize
in class RedisChannelMessageStore
public org.springframework.integration.store.MessageGroup getMessageGroup(java.lang.Object groupId)
getMessageGroup
in interface org.springframework.integration.store.BasicMessageGroupStore
getMessageGroup
in class RedisChannelMessageStore
public org.springframework.integration.store.MessageGroup addMessageToGroup(java.lang.Object groupId, org.springframework.messaging.Message<?> message)
addMessageToGroup
in interface org.springframework.integration.store.BasicMessageGroupStore
addMessageToGroup
in class RedisChannelMessageStore
public org.springframework.messaging.Message<?> pollMessageFromGroup(java.lang.Object groupId)
pollMessageFromGroup
in interface org.springframework.integration.store.BasicMessageGroupStore
pollMessageFromGroup
in class RedisChannelMessageStore
@ManagedAttribute public int getMessageGroupCount()
getMessageGroupCount
in class RedisChannelMessageStore
public void removeMessageGroup(java.lang.Object groupId)
removeMessageGroup
in interface org.springframework.integration.store.BasicMessageGroupStore
removeMessageGroup
in class RedisChannelMessageStore
@ManagedAttribute public int getMessageCountForAllMessageGroups()
getMessageCountForAllMessageGroups
in class RedisChannelMessageStore