Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Aggregators > Release Strategy

Release Strategy

The release strategy of an aggregator dictates at which point the collected messages should be sent or released for aggregation. Until and unless the signal is sent, the framework stores the messages, except when a release-on-expire flag is set.

The default strategy is represented by SequenceSizeReleaseStrategy, which implements a ReleaseStrategy interface. It works on the algorithm that checks the presence of messages grouped by SEQUENCE_SIZE. For example, if the SEQUENCE_SIZE is 10, the strategy will trigger a signal to the aggregator to begin only after it receives all 10 messages with sequence numbers ranging from 1 to 10.

Similar to CorrelationStrategy, you can either implement the framework’s ReleaseStrategy or create your own custom class that can signal the release. The following code implements Framework’s interface:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial