Reputation: 831
Does the spring integration framework have any features I can use to guarantee message order?
We are needing to run our spring integration flow on two different nodes to keep up with the message volume. I have seen several solutions for solving this issue, but I wanted to see if the framework already has something.
This article might better explain what I'm trying to ask.
http://sleeplessinslc.blogspot.com/2010/02/message-ordering-in-jms-using-coherence.html
Upvotes: 1
Views: 3299
Reputation: 121560
Yes, it is here. And its name Resequencer. From Spring Integration Reference Manual: http://docs.spring.io/spring-integration/docs/latest-ga/reference/html/messaging-routing-chapter.html#resequencer.
Each of message for reordering has to have a correlationId
header to compare with other messages and sequenceNumber
to determine the real order of that message to emit.
The release-partial-sequences="true"
does the stuff to release messages, when the correct order is achieved by default SequenceSizeReleaseStrategy
on the next message.
Upvotes: 4