List of usage examples for org.springframework.integration.mongodb.store MessageDocument setGroupCreatedTime
public void setGroupCreatedTime(long groupCreatedTime)
From source file:org.springframework.integration.mongodb.store.AbstractConfigurableMongoDbMessageStore.java
protected void addMessageDocument(final MessageDocument document) { if (document.getGroupCreatedTime() == 0) { document.setGroupCreatedTime(System.currentTimeMillis()); }/*from w ww. j a va 2s . c o m*/ document.setCreatedTime(System.currentTimeMillis()); try { this.mongoTemplate.insert(document, this.collectionName); } catch (DuplicateKeyException e) { if (this.logger.isDebugEnabled()) { this.logger.debug("The Message with id [" + document.getMessageId() + "] already exists.\n" + "Ignoring INSERT and SELECT existing..."); } } }