more problems since state is immutable but some state of agents and client is not immutable so it ignored events that were not really duplicates. This reverts commit f6b0211336.
f6b0211336
Asynchronous variant that is easier to use and multi-thread safe.