Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sequencer component is used to retain the sequence of messages when a certain section of the flow has to be processed in multiple flows for performance concerns. When messages are split into parallel flows, the messages are not guaranteed to reach the end of the flow in the order of their arrival.  A pair of sequencer components launched in Generate and Resequence modes respectively ensures the order is maintained.

Configuration


Figure 1: Component Configuration properties

Sequencer Mode

It has two options—Generate and Resequence. The first option is used to generate a sequence starting from the given Initial Sequence Number. Resequence sorts all the messages as it is stored in the sorted map. Hence, they appear in the order of their arrival. This is most useful in a Multithreaded environment.

...

Number from which sequence starts. By default, it is set to 1.

Sequence Type

The two sequence types for Resequence Sequencer Mode are:

  • Continuous: Select this to have two consecutive sequence numbers differ by 1.
  • Non-Continuous: Sequence numbers are not generated continuously.

...

Tip
titlePersisting state across restarts

For the solution to work even when components are restarted, the following changes have to be made.

  • Use CLIENT_ACKNOWLEDGE mode on the input port of the Sequencer component launched in resequence mode. This ensures any out of sequence messages received by the component will be pushed back to the input port when the component is stopped.
  • Use the Continue from previous run option in both generate sequence and resequence mode. This makes sure the sequence number is retrieved from DB.

Data base Configuration

Click the ellipsis button to configure the required database.

Tip

Refer the Database Configuration section in the DB page for descriptions of database configuration properties.

Image Added
Figure 2: Database Configuration

Threadpool Configuration

This property is used when there is a need to process messages in parallel within the component, still maintaining the sequence from the external perspective. 

Note
  • Limit the usage of the Threadpool Configuration property only in circumstances as mentioned above.
  • If sequential processing is not required, please use sessions on the input port.

Click the Threadpool Configuration ellipsis button to configure the Threadpool Configuration properties.

Image Added
Figure 3: Threadpool Configuration

Enable Thread Pool

Enable this option to configure the properties that appear as below.

Pool Size

Number of requests to be processed in parallel within the component. Default value is '1'.

Batch Eviction Interval (in ms)

Time in milliseconds after which the threads are evicted in case of inactivity. New threads are created in place of evicted threads when new requests are received. Default value is '1000'.

Functional Demonstration

Scenario 1

...

Filters are appropriately set on routes so that each parallel flow receives the corresponding message.


Figure 4: Sample flow

Sample Output


Figure 5: Output in the Display window

Useful Tips

  • Notification IntervalResequence Interval, and Sequence Type properties appear only on selection of 'Resequence' option as Sequencer Mode.

...

Adaptavist ThemeBuilder EngineAtlassian Confluence