ElasticSearch on Demand
Twitter data producer:
Github source code for twitter producer
ElasticSearch Consumer:
To achieve Idempotence in Kafka, we can use the following to generate the same id for the same message when it is processed again. This is Kafka generic id. Similarly other methods can be used so that even if process the message more than once we don't create duplicates.
// kafka generic ID
String id = record.topic() + "_" + record.partition() + "_" + record.offset();












