Schedulers
Each reactor template can be used to start multiple reactor instances, and each reactor instance can be started with a different reactor scheduler. Different schedulers have different characteristics in terms of execution priority, frequency, latency, and throughput. In this section, we take a look at how to use a non-default scheduler, and how to define custom schedulers when necessary.
We start by defining a reactor that logs incoming events, reports every time it gets scheduled, and ends after being scheduled three times. We will use the sysEvents stream of the reactor, which will be explained in the next section. For now, all you need to know is that the system event stream produces events when the reactor gets some execution time ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access