Skip to content

Instantly share code, notes, and snippets.

@mykidong
Created May 24, 2018 14:22
Show Gist options
  • Save mykidong/0f23817da98118e0f713153c41c3a426 to your computer and use it in GitHub Desktop.
Save mykidong/0f23817da98118e0f713153c41c3a426 to your computer and use it in GitHub Desktop.
@Override
public void onEvent(EventLog eventLog, long l, boolean b) throws Exception {
String topic = eventLog.getEventType();
String json = eventLog.getValue();
// send event log to kafka.
if (this.sendMessageEnabled) {
producer.send(new ProducerRecord<Integer, String>(topic, json));
}
}
@mykidong
Copy link
Author

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment