Skip to content

GH-2744: ScatterGather: reinstate request headers #2750

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -139,7 +139,7 @@ else if (this.gatherChannel instanceof ReactiveStreamsSubscribableChannel) {
}
else {
throw new MessageDeliveryException(message,
"The 'gatherResultChannel' header is required to delivery gather result.");
"The 'gatherResultChannel' header is required to deliver the gather result.");
}
}));
}
Expand Down
4 changes: 2 additions & 2 deletions src/reference/asciidoc/scatter-gather.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,6 @@ This way the target exception is returned to the gatherer of the `ScatterGatherH
Such an exception `payload` can be filtered out in the `MessageGroupProcessor` of the gatherer or processed other way downstream, after the scatter-gather endpoint.

NOTE: Before sending scattering results to the gatherer, `ScatterGatherHandler` reinstates the request message headers, including reply and error channels if any.
This way errors from the `AggregatingMessageHandler` are going to be propagated to the caller, even if async hand off is applied for scatter recipients.
This way errors from the `AggregatingMessageHandler` are going to be propagated to the caller, even if async an hand off is applied in scatter recipient subflows.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an async - will fix on merge

In this case a reasonable, finite `gatherTimeout` must be configured for the `ScatterGatherHandler`.
Otherwise it is going to be blocked waiting for reply from the gatherer forever by default.
Otherwise it is going to be blocked waiting for a reply from the gatherer forever, by default.