Reputation: 14149
I'm trying to configure Reactor to use Chronicle based persistence, and I cannot find by information about this in documentation. I see two ways:
PersistentQueue
EventBatcher
with such queue to wrap my Reactor
instance Which option is better? Or maybe there is another solution which I overlooked?
Upvotes: 1
Views: 1161
Reputation: 741
Reactor doesn't have persistence built into the Reactor object (which is why you're not finding documentation on it :).
If you're trying to persist the Events coming through for resiliency and replay purposes, you'll probably want to use the EventBatcher
. The test for EventBatcher
has some code in it that shows how to combine an Observable
and a PersistentQueue
.
The option of writing your own PersistentDispatcher
is certainly an interesting one. That path will be fraught with danger, though, as dispatching code is unforgiving when it comes to throughput. Even the smallest of changes can have drastic impacts on throughput. We've just re-written them as well to get more performance, so the latest code in master is different from the 1.0 release versions of the Dispatchers.
I wouldn't recommend taking the Dispatcher
route right away, though. I'd try the EventBatcher
first and only if that can't be used in your use case would I experiment with a custom Dispatcher
. There are two new abstract base classes (here and here) to base new Dispatcher
implementations on if you do decide to go that route.
Upvotes: 2