String routingKey = "topicrecover";
String index = "topicrecover";
List<Message> msgList = new ArrayList<Message>();
int msgCount = 100;
for (int i = 0; i < msgCount; ++i) {
msgList.add(new Message(routingKey, jsonMapper.writeValueAsBytes(msg)));
}
BulkRequest request = sink.createBulkRequest(msgList);
for (int i = 0; i < msgCount; ++i) {
sink.recover(i, request);