Skip to content

Instantly share code, notes, and snippets.

View o-x-y-g-e-n's full-sized avatar

Shivam Gohel o-x-y-g-e-n

View GitHub Profile
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.clients.consumer.OffsetAndTimestamp;
import org.apache.kafka.common.TopicPartition;
import java.time.Duration;
import java.util.*;
import java.util.stream.Collectors;