Created
May 24, 2018 14:18
-
-
Save mykidong/463b3d90b179e2d61212f2e2e28d95d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// init. disruptor event log translator. | |
BaseTranslator.EventLogTranslator eventLogValidationTranslator = new BaseTranslator.EventLogTranslator(); | |
// handle http or tcp request. | |
Buffer body = ... | |
// get body from the request. | |
String json = new String(body.getBytes()); | |
// set the values to event translator. | |
eventLogValidationTranslator.setVersion("1.0.0"); | |
eventLogValidationTranslator.setEventType("page-view-event"); | |
eventLogValidationTranslator.setValue(json); | |
// publish the event to validation disruptor. | |
validationDisruptor.publishEvent(this.eventLogValidationTranslator); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.