Open
Description
There are two main things that I dislike about the current way we handle event logging:
- Having a catch-all "all" topic defeats the purpose of a topic-based messaging system. We should think more about the topics we use to log events to. As a starting point, structuring this similar to "regular" logging might be a good idea, e.g., sending your usual scheduler events to
scheduler
or P2P events top2p
. - We allow anything that's msgpack-serializable to be a message. Implicitly, we have already aligned on the convention of using a dictionary with an
action
key that acts as an identifier of the specific message type. We should make this explicit. Right now, this free-form format just allows producers to dump bad/unstructured messages and force consumers to deal with the mess. Personally, I'd also be in favor of adding better type-hinting either via typed dicts, dataclasses, or similar.