protected void completeGroup(Object correlationKey, MessageGroup group, Lock lock) { Message<?> first = null; if (group != null) { first = group.getOne(); } completeGroup(first, correlationKey, group, lock); }
protected void expireGroup(Object correlationKey, MessageGroup group, Lock lock) { if (this.logger.isInfoEnabled()) { this.logger.info("Expiring MessageGroup with correlationKey[" + correlationKey + "]"); } if (this.sendPartialResultOnExpiry) { if (this.logger.isDebugEnabled()) { this.logger.debug("Prematurely releasing partially complete group with key [" + correlationKey + "] to: " + getOutputChannel()); } completeGroup(correlationKey, group, lock); } else { if (this.logger.isDebugEnabled()) { this.logger.debug("Discarding messages of partially complete group with key [" + correlationKey + "] to: " + (this.discardChannelName != null ? this.discardChannelName : this.discardChannel)); } if (this.releaseLockBeforeSend) { lock.unlock(); } group.getMessages() .forEach(this::discardMessage); } if (this.applicationEventPublisher != null) { this.applicationEventPublisher.publishEvent( new MessageGroupExpiredEvent(this, correlationKey, group.size(), new Date(group.getLastModified()), new Date(), !this.sendPartialResultOnExpiry)); } }
try { noOutput = false; completedMessages = completeGroup(message, correlationKey, messageGroup, lock);
noOutput = false; if (this.releaseStrategy.canRelease(groupNow)) { completeGroup(correlationKey, groupNow, lock);
protected void completeGroup(Object correlationKey, MessageGroup group, Lock lock) { Message<?> first = null; if (group != null) { first = group.getOne(); } completeGroup(first, correlationKey, group, lock); }
protected void expireGroup(Object correlationKey, MessageGroup group, Lock lock) { if (this.logger.isInfoEnabled()) { this.logger.info("Expiring MessageGroup with correlationKey[" + correlationKey + "]"); } if (this.sendPartialResultOnExpiry) { if (this.logger.isDebugEnabled()) { this.logger.debug("Prematurely releasing partially complete group with key [" + correlationKey + "] to: " + getOutputChannel()); } completeGroup(correlationKey, group, lock); } else { if (this.logger.isDebugEnabled()) { this.logger.debug("Discarding messages of partially complete group with key [" + correlationKey + "] to: " + (this.discardChannelName != null ? this.discardChannelName : this.discardChannel)); } if (this.releaseLockBeforeSend) { lock.unlock(); } group.getMessages() .forEach(this::discardMessage); } if (this.applicationEventPublisher != null) { this.applicationEventPublisher.publishEvent( new MessageGroupExpiredEvent(this, correlationKey, group.size(), new Date(group.getLastModified()), new Date(), !this.sendPartialResultOnExpiry)); } }
try { noOutput = false; completedMessages = completeGroup(message, correlationKey, messageGroup, lock);
noOutput = false; if (this.releaseStrategy.canRelease(groupNow)) { completeGroup(correlationKey, groupNow, lock);