Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Reliant Continuation State when running Scatter Gather in sequential mode #2288

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,17 @@ public boolean mediate(MessageContext synCtx, ContinuationState continuationStat
}

if (result) {
// If the mediation is completed, remove the child continuation state from the stack, so the aggregation
// will continue the mediation from the parent continuation state
ContinuationStackManager.removeReliantContinuationState(synCtx);
return aggregateMessages(synCtx, synLog);
}
return false;
}

private boolean aggregateMessages(MessageContext synCtx, SynapseLog synLog) {

// If the mediation is completed, remove the child continuation state from the stack, so the aggregation
// will continue the mediation from the parent continuation state
ContinuationStackManager.removeReliantContinuationState(synCtx);

ForEachAggregate aggregate = null;
String correlationIdName = EIPConstants.AGGREGATE_CORRELATION + "." + id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,17 @@ public boolean mediate(MessageContext synCtx, ContinuationState continuationStat
}
}
if (result) {
// If the mediation is completed, remove the child continuation state from the stack, so the aggregation
// will continue the mediation from the parent continuation state
ContinuationStackManager.removeReliantContinuationState(synCtx);
return aggregateMessages(synCtx, synLog);
}
return false;
}

private boolean aggregateMessages(MessageContext synCtx, SynapseLog synLog) {

// If the mediation is completed, remove the child continuation state from the stack, so the aggregation
// will continue the mediation from the parent continuation state
ContinuationStackManager.removeReliantContinuationState(synCtx);

Aggregate aggregate = null;
String correlationIdName = EIPConstants.AGGREGATE_CORRELATION + "." + id;

Expand Down
Loading