Announcement Announcement Module
No announcement yet.
Synchronized Channel for Strict Ordering of Messages? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Synchronized Channel for Strict Ordering of Messages?

    If we are receiving messages on a channel from a source system that have no ordering information in their header to base a Resequencer on, can/should Spring Integration provide support for a synchronized channel type that will enrich the message header with sequencing information based on the strict (physical) order in which the messages were received on the channel?

  • #2
    Messaging Destinations usually maintain (depending on the vendor) Queue semantics such as FIFO, so the sequencing information is not really necessary unless one wants to store messages in some type of un-ordered structure (e.g., map) for later processing where the order must be restored. If you need to do so custom header-enricher with global counter would do the trick. Now when i say global counter i am truly implying Global in a sense that if you have more then one consumer to the queue-destination the typical messaging system will default to round-robin, therefore two consumers must deal with synchronization of the counter etc... But if you go that route there are more issues to deal with anyway, since its not only about maintaining the sequence, but also about when one consumer knows that another has finished processing etc...
    You can read more about patterns for Strict Message order here:
    Last edited by oleg.zhurakousky; Jun 14th, 2010, 06:32 AM.