Work can be marked as idempotent: when scheduling multiple time the same work (same id) only the first work is executed, others are skipped.
Without this idempotent flag, the work is executed as many times as it is scheduled.
We want another possible behavior when scheduling many times the same work (same id): we care only about the lastest execution.
A use case can be a long-running LazyRenditionBuilder Work load that is polled frequently and has a fast-changing source document can easily monopolize the RenditionBuilder work queue across the cluster by scheduling the same work lots of times. First, this starves Rendition Building for other Works. Second, it is extremely inefficient for multiple worker nodes in the cluster to waste time building nearly identical renditions most of which will never be delivered.
This optimization flag can be called caolesing, the StreamWorkManager should take this flag in account.