I have a class named Foo
producing Bar
(immutable data) very fast (many times a second).
I have many consumers looking to consume the data produced.
Here is my requirements :
- It has to be asynchronously so the producer is never blocked or waiting
- All consumers must receive the same data
- If for some reason one consumer is delay, it should consume the latest message
- Every minute there is a message that must be sent and received by all consumers.
- I really want to abstract my consumers from any data flow implementation (Like TPL for example), simply to subscribe to the producer.
My logical is telling me to use events, but event may impact my performance,
I once used the TPL library but only for ActionBlock, so I'm lacking in my knowledge in this area.
What solution fits my case ?