public class MongoDbChannelMessageStore extends AbstractConfigurableMongoDbMessageStore implements org.springframework.integration.store.PriorityCapableChannelMessageStore
PriorityCapableChannelMessageStore
implementation.
This message store shall be used for message channels only.
Provide the priorityEnabled
option to allow to poll messages via priority
manner.
As a priority document field the IntegrationMessageHeaderAccessor.PRIORITY
message header is used.
The same collection can be used for org.springframework.integration.channel.QueueChannel
s and
org.springframework.integration.channel.PriorityChannel
s, but the different instances of
MongoDbChannelMessageStore
should be used for those cases, and the last one with
priorityEnabled = true
option.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_COLLECTION_NAME |
applicationContext, collectionName, CREATED_DATE_KEY, logger, mappingMongoConverter, messageBuilderFactory, mongoDbFactory, mongoTemplate, SAVED_KEY, SEQUENCE_NAME
Constructor and Description |
---|
MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory) |
MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter) |
MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter,
java.lang.String collectionName) |
MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory,
java.lang.String collectionName) |
MongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate) |
MongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate,
java.lang.String collectionName) |
Modifier and Type | Method and Description |
---|---|
org.springframework.integration.store.MessageGroup |
addMessageToGroup(java.lang.Object groupId,
org.springframework.messaging.Message<?> message) |
void |
afterPropertiesSet() |
org.springframework.integration.store.MessageGroup |
getMessageGroup(java.lang.Object groupId)
Not fully used.
|
boolean |
isPriorityEnabled() |
org.springframework.messaging.Message<?> |
pollMessageFromGroup(java.lang.Object groupId) |
void |
setPriorityEnabled(boolean priorityEnabled) |
addMessageDocument, getMessage, getNextId, groupIdQuery, messageGroupSize, removeMessageGroup, setApplicationContext
public static final java.lang.String DEFAULT_COLLECTION_NAME
public MongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate)
public MongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate, java.lang.String collectionName)
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory)
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory, org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter)
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory, java.lang.String collectionName)
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDbFactory mongoDbFactory, org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter, java.lang.String collectionName)
public void setPriorityEnabled(boolean priorityEnabled)
public boolean isPriorityEnabled()
isPriorityEnabled
in interface org.springframework.integration.store.PriorityCapableChannelMessageStore
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractConfigurableMongoDbMessageStore
java.lang.Exception
public org.springframework.integration.store.MessageGroup addMessageToGroup(java.lang.Object groupId, org.springframework.messaging.Message<?> message)
addMessageToGroup
in interface org.springframework.integration.store.BasicMessageGroupStore
public org.springframework.integration.store.MessageGroup getMessageGroup(java.lang.Object groupId)
getMessageGroup
in interface org.springframework.integration.store.BasicMessageGroupStore
public org.springframework.messaging.Message<?> pollMessageFromGroup(java.lang.Object groupId)
pollMessageFromGroup
in interface org.springframework.integration.store.BasicMessageGroupStore