Sagar
Sagar

Reputation: 838

How can I preserve message history across a split

It seems like if I print the message history before and after a split, history traced before split is lost after the split. is there any way to preserve the message history

Upvotes: 0

Views: 246

Answers (1)

Olli
Olli

Reputation: 679

When the exchange is split() each sub-exchange is newly created by default.

What you're looking for is sharing the unit of work; for example,

.split(body()).shareUnitOfWork()

See the section Sharing Unit of Work in Camel's Splitter documentation.

Upvotes: 1

Related Questions