I want to implement state machine integrated with Kafka topics. Whenever some message will be produced to a topic, I want state machine to react by changing a state. I have two questions:
- Is producing a message on a topic identical with publishing an event?
- How to wire things up in a proper way? Some simple code example would be welcome.