Create quickstart-events topic.
bin/kafka-topics.sh --create --topic quickstart-events \
--partitions 4 --bootstrap-server localhost:9092
Open consumer for this topic.
bin/kafka-console-consumer.sh --topic quickstart-events \
--from-beginning --bootstrap-server localhost:9092
Run domain-event-publisher to emit UpdateCustomer and ActivateCustomer events.
Supposed to be used with Change Data Capture pattern to emit domain events.
TODO: requires SQL schema and testing.
Run subscriber-api to access events via HTTP SSE.
Receive all events from the beginning:
curl -v http://localhost:8080/topics/quickstart-events/events
Filter events by event type:
curl -v http://localhost:8080/topics/quickstart-events/events?eventTypes=UpdateCustomer
Request events using a cursor:
curl -v -H "x-last-event-id:MCwx" \
http://localhost:8080/topics/quickstart-events/events
TODO: filter by tenant-id, multiple topics.
Uses Subscriber API to read events and update local read store. Run domain-event-projector.
TODO: SQL repository implementation.