Class MongoDbChannelMessageStore
java.lang.Object
org.springframework.integration.store.AbstractBatchingMessageGroupStore
org.springframework.integration.store.AbstractMessageGroupStore
org.springframework.integration.mongodb.store.AbstractConfigurableMongoDbMessageStore
org.springframework.integration.mongodb.store.MongoDbChannelMessageStore
- All Implemented Interfaces:
Iterable<org.springframework.integration.store.MessageGroup>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.integration.store.BasicMessageGroupStore,org.springframework.integration.store.ChannelMessageStore,org.springframework.integration.store.MessageGroupStore,org.springframework.integration.store.PriorityCapableChannelMessageStore
public class MongoDbChannelMessageStore
extends AbstractConfigurableMongoDbMessageStore
implements org.springframework.integration.store.PriorityCapableChannelMessageStore
MongoDB
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.QueueChannels and
org.springframework.integration.channel.PriorityChannels, but the different instances of
MongoDbChannelMessageStore should be used for those cases, and the last one with
priorityEnabled = true option.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.store.MessageGroupStore
org.springframework.integration.store.MessageGroupStore.MessageGroupCallback -
Field Summary
FieldsFields inherited from class org.springframework.integration.mongodb.store.AbstractConfigurableMongoDbMessageStore
collectionName, logger, mongoDbFactory, SEQUENCE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionMongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate) MongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate, String collectionName) MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory) MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory, String collectionName) MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory, org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter) MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory, org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter, String collectionName) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.integration.store.MessageGroupaddMessageToGroup(Object groupId, org.springframework.messaging.Message<?> message) voidorg.springframework.integration.store.MessageGroupgetMessageGroup(Object groupId) Not fully used.booleanorg.springframework.messaging.Message<?>pollMessageFromGroup(Object groupId) voidsetPriorityEnabled(boolean priorityEnabled) Methods inherited from class org.springframework.integration.mongodb.store.AbstractConfigurableMongoDbMessageStore
addMessageDocument, addMessagesToGroup, completeGroup, getApplicationContext, getMappingMongoConverter, getMessage, getMessageBuilderFactory, getMessageMetadata, getMessagesForGroup, getMongoTemplate, getNextId, getOneMessageFromGroup, groupIdQuery, iterator, messageGroupSize, removeMessageGroup, removeMessagesFromGroup, setApplicationContext, setGroupCondition, setLastReleasedSequenceNumberForGroupMethods inherited from class org.springframework.integration.store.AbstractMessageGroupStore
copy, expireMessageGroups, getGroupMetadata, getMessageCountForAllMessageGroups, getMessageGroupCount, getMessageGroupFactory, isTimeoutOnIdle, registerMessageGroupExpiryCallback, removeMessagesFromGroup, setExpiryCallbacks, setLazyLoadMessageGroups, setTimeoutOnIdleMethods inherited from class org.springframework.integration.store.AbstractBatchingMessageGroupStore
getRemoveBatchSize, setMessageGroupFactory, setRemoveBatchSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.store.BasicMessageGroupStore
messageGroupSize, removeMessageGroupMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.springframework.integration.store.MessageGroupStore
streamMessagesForGroup
-
Field Details
-
DEFAULT_COLLECTION_NAME
The default conventional collection name.- See Also:
-
-
Constructor Details
-
MongoDbChannelMessageStore
public MongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate) -
MongoDbChannelMessageStore
public MongoDbChannelMessageStore(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate, String collectionName) -
MongoDbChannelMessageStore
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory) -
MongoDbChannelMessageStore
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory, org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter) -
MongoDbChannelMessageStore
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory, String collectionName) -
MongoDbChannelMessageStore
public MongoDbChannelMessageStore(org.springframework.data.mongodb.MongoDatabaseFactory mongoDbFactory, org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter, String collectionName)
-
-
Method Details
-
setPriorityEnabled
public void setPriorityEnabled(boolean priorityEnabled) -
isPriorityEnabled
public boolean isPriorityEnabled()- Specified by:
isPriorityEnabledin interfaceorg.springframework.integration.store.PriorityCapableChannelMessageStore
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractConfigurableMongoDbMessageStore
-
addMessageToGroup
public org.springframework.integration.store.MessageGroup addMessageToGroup(Object groupId, org.springframework.messaging.Message<?> message) - Specified by:
addMessageToGroupin interfaceorg.springframework.integration.store.BasicMessageGroupStore- Overrides:
addMessageToGroupin classorg.springframework.integration.store.AbstractMessageGroupStore
-
getMessageGroup
Not fully used. Only wraps the provided group id.- Specified by:
getMessageGroupin interfaceorg.springframework.integration.store.BasicMessageGroupStore
-
pollMessageFromGroup
- Specified by:
pollMessageFromGroupin interfaceorg.springframework.integration.store.BasicMessageGroupStore
-