janitor
The janitor looks after the inbox. On every run it does four things, in this order.
- Sets to
PERSISTEDthe envelopes the ingester has written, from theEnvelopePersistedevents received since the last run. - Sets to
QUARANTINEDthe envelopes inEnvelopeQuarantinedevents. - Deletes the
PERSISTEDenvelopes older thanmillisecondsTTL. - Publishes again, as
EnvelopeStored, the envelopes that have been inCAPTUREDfor longer thanmillisecondsThreshold, and increases their retry counter. When the counter reaches three, it sets them toQUARANTINEDinstead.
The janitor artifact, version 1.2.1, is included in the runtime.
Configuration
Section titled “Configuration”| Key | Meaning | Default |
|---|---|---|
milliseconds |
Time between runs. | 5000 |
millisecondsThreshold |
How long an envelope can stay in CAPTURED before it is published again. |
3 minutes |
millisecondsTTL |
How long a PERSISTED envelope stays in the inbox. |
1 day |
- janitor: id: orders-janitor configuration: milliseconds: 5000 millisecondsThreshold: 10000 millisecondsTTL: 60000The maximum number of retries can only be changed in Java, with withMaxRetries on the janitor builder.
Envelope lifecycle explains the states in detail.