Description
Background
In an attempt to avoid synchonization the browse start update is done proabilistically.
Configuring the underlying values is hard, and theprobability behind this are hard to grasp.
Full design :
- https://github.com/apache/james-project/blob/master/src/adr/0031-distributed-mail-queue.md
- https://github.com/apache/james-project/blob/master/src/adr/0032-distributed-mail-queue-cleanup.md
Goal
In practice many environments supports centralized schedulers (eg: kubernees), we can offload to them the periodic planning of the browse start update, thus easing the overall reasonning around the RabbitMQ MailQueue.
How?
Implement a webadmin endpoint to update browseStart pace. Only exposed if the CassandraMailQueue view is supported.
Example:
curl -XPOST /mailQueues/root?task=updateBrowseStart
DOD unit test with cassandra instrumentation on top of the mailQureueView.
Don't forget to document this endpoint...
Port it on master, 3.8.x, 3.7.x
Expected benefits
Tasks allow better tracking on how long the browse start update takes. One can also look atthe execution history through task results (success/failure) while probabilistic scheduling demands careful log reviews.