Warning: I’m not totally satisfied with this feature and with the current implementation. It will change in the future. Please provide me feedbacks ;)
Mirabelle allows you in its configuration file to optionally persist some events into a queue written on disk. The queue implementation is a Chronicle Queue.
You can configure the queue roll cycle in the Mirabelle configuration. The default is :half-hourly
. More information about roll cycles can be found here.
Note: Mirabelle will not rotate/delete old files for you. You need to do it yourself.
(where [:= :service "foo"]
(disk-queue!))
In this example, Mirabelle will write all events with :service
“foo” on disk.
Why is it useful ? You can use the queue for:
The reinjected events will be tagged “discard”. All stateful actions (I/O, pubsub, logger) will not be executed for discarded events. It means the events will rebuild all streams internal states but without producing side effects.
It’s nice, but it’s not perfect. The two big limitations today are:
:default
streams. So be careful about that, the queue will not work with other streams. I will work on that.This feature will probably change in the future, i’m thinking hard about how to rebuild streams states quickly and without sacrificing streams performances. Ideas are welcomed.