We want to implement a maintenance script that consumes delete events (using the page_change jsonschema) from stdin, deserializes them into PageDeletedEvents, and dispatches them.
@daniel has some PoC code we can piggyback on.
Some questions we want to answer:
- Is it possible to de-serialize events produced by EventBus into PHP? What are tradeoff wrt cross-language support?
- What kind of Domain Event metadata would we need to extend (or wrap around) page_change?
- How do we register the producer?
- How would events be dispatched to consumers?
- What would Kafka integration look like? Do we need Kafka consumer code at all?
Using stdin as the input source keeps us open to solutions orthogonal to a PHP Kafka client (e.g., approaches similar to Mercurius).