Skip to content

Release message group with groupTimeout in multiple instances context #9817

Closed Answered by artembilan
Ngoctrong102 asked this question in Q&A
Discussion options

You must be logged in to vote

The logic there is like this:

  1. We schedule a group for expiration after timeout:
			if (startTime != null) {
				Object groupId = messageGroup.getGroupId();
				long timestamp = messageGroup.getTimestamp();
				long lastModified = messageGroup.getLastModified();
				ScheduledFuture<?> scheduledFuture =
						getTaskScheduler()
								.schedule(() -> {
									try {
										processForceRelease(groupId, timestamp, lastModified);
									}
									catch (MessageDeliveryException ex) {
										logger.warn(ex, () ->
												"The MessageGroup [" + groupId +
														"] is rescheduled by the reason of: ");
										scheduleGroupToForceComplete(groupId);
									}
								}, s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ngoctrong102
Comment options

Answer selected by Ngoctrong102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants