integration_resequencer 1.0.0

Download zip

class: Resequencer

[50:14] (extern: com.lehman.aussom.Resequencer) extends: object

Resequencer takes messages that arrive out of order and releases them in order, one at a time, by sequence number. It holds back a message that arrives early until the messages that should come before it have been released, then lets the run through. It is an Aussom Server client listener: register it with app.registerListener and the server runtime runs its background sweeper on a dedicated thread. Feed it messages with accept() from any thread. The Resequencer is standalone and generic. It defines no message type and the payload may be any Aussom value. Only the sequence number and payload are required; an optional correlation id lets one Resequencer reorder several independent streams at once, each tracked on its own. The head (lowest buffered message) is released when it is the immediate successor of the last released number (no delay), when the buffer exceeds the capacity, or when it has waited the hold window (setTimeoutMs). A zero hold window releases the first message that arrives at once and drops any later, lower number as late.

Methods

class: integration_resequencer_module

[23:14] static extends: object

Module JAR loader class. Loads the bundled jar that backs the Resequencer before any extern class resolves.

Methods