TPL Dataflow will process all items in order; that’s what it’s made to do. You can try to do a most-recent kind of approach by using a BroadcastBlock
, but since that block is linked to another block, you’ll probably end up with one in process, one waiting to be processed, and the third one being the one actually getting overwritten.
If you want it tighter than that (i.e., one in process and one waiting that is also overwritten), then I’d recommend Channels. Specifically, a bounded channel using BoundedChannelFullMode.DropOldest
.
3
solved TPL Dataflow uses old data instead of the newest