I've tried to get Kinesis data by Flink.
In my case, there are multiple message in one record. How can I divide it to multiple records? (I'll send it to Elasticsearch.)
I tried to search it but I couldn't find appropriate answer.
What my code does is get data from Kinesis, decompress gzip, convert it to string, then use objectMapper.readvalue to my POJO for java.
There's two POJO's: one for whole event, one for LogEvents.
{
"messageType":"DATA_MESSAGE","owner":"<account id>",
"logGroup":"<clustername>","logStream":"<log stream name>",
"subscriptionFilters":["<subscription name>"],
"logEvents":[
{"id":"<id>","timestamp":<timestamp>,"message":"msg 1"},
{"id":"<id>","timestamp":<timestamp>,"message":"msg 2"},
{"id":"<id>","timestamp":<timestamp>,"message":"msg 3"},
{"id":"<id>","timestamp":<timestamp>,"message":"msg 4"},
]
}