Skip to content

Wrap MessageGroupProcessor result a collection of payloads into a message in the AbstractCorrelatingMessageHandler #9706

@artembilan

Description

@artembilan

Right now, the AbstractCorrelatingMessageHandler fails like:

		Assert.isAssignable(Message.class, commonElementType, () ->
				"The expected collection of Messages contains non-Message element: " + commonElementType);

if custom MessageGroupProcessor (which simply can be lambda) returns just a collection of payloads, but not messages.

The DefaultAggregateHeadersFunction can be used in this case to wrap that collection into a single message with grouped headers.
Similar to what happens in the AbstractAggregatingMessageGroupProcessor.

More info in: https://stackoverflow.com/questions/79253871/stop-execution-splitter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions