Right now we have three separate things a callback can be registered to listen for:
- Topic
- System events
- Generic predicate function
The predicate function is wrapped and receives a topic and a message on call, and the wrapper does some basic equality checking for topics and system events. These bits of information do not translate to the callbacks themselves, which are expected to just take contents.
It would be the most helpful if predicates and callbacks can expect a consistent set of keys to be passed to them, that are documented in one place and are opt-in. kopf is a good example of this with their event listeners, but there are others.
Right now we have three separate things a callback can be registered to listen for:
The predicate function is wrapped and receives a topic and a message on call, and the wrapper does some basic equality checking for topics and system events. These bits of information do not translate to the callbacks themselves, which are expected to just take contents.
It would be the most helpful if predicates and callbacks can expect a consistent set of keys to be passed to them, that are documented in one place and are opt-in.
kopfis a good example of this with their event listeners, but there are others.