Hi,
I am asked to write a Event Sourcing Library, that can be used by any Java application/API to produce custom events. These events will be described in a JSON file which will be available to all consuming java applications to lookup and send events (JSON preferred to fit on-going changes).
Basic outline for the JSON will be as follows:
{ event1:[eventType, name, des] }
Any producing application should be able to produce events in a very simple way:
import com.myEventsLibrary.EventProducer my sampleClass{ public static void main(String[] args){ String config = "config.json"; EventProducer myEvent = new EventProducer(config); String msg = args[0]; myEvent.send(msg); } }
the consuming library should write these events to a Kafka topic. I need some basic starter for how to receive the myEvent.send(msg) and write it to Kafka topic (which I have some knowledge about).