Last active
November 12, 2018 06:59
-
-
Save anmol2709/df938b1661b8e66aca3723b28ac034b4 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
val intermediateFlow =Flow[ConsumerRecord[Array[Byte], String]].map { kafkaMessage => | |
// Parsing the record as Company Object | |
val company = Json.parse(kafkaMessage.value()).as[Company] | |
val companyLocation = company.location | |
// Transform message so that we can write to elastic | |
WriteMessage.createIndexMessage(companyLocation, company) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment