package Ġno . nav . hel se . flex . testdata . kafka Ċ Ċ import Ġorg . apache . kafka . clients . consumer . Consumer Config Ċ import Ġorg . apache . kafka . clients . consumer . Kafka Consumer Ċ import Ġorg . apache . kafka . common . serialization . String Deserializer Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ Ċ @ Configuration Ċ class ĠTest A iven Kafka Config ( ĊĠĠĠ Ġprivate Ġval Ġkafka Config : ĠA iven Kafka Config , Ċ Ċ ) Ġ{ ĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġkafka Consumer () Ġ= ĠKafka Consumer < String , ĠString >( consumer Config ()) ĊĊĠĠĠ Ġprivate Ġfun Ġconsumer Config () Ġ= Ġmap Of ( ĊĠĠĠĠĠĠĠ ĠConsumer Config . GROUP _ ID _ CONFIG Ġto Ġ" testing - group - id ", ĊĠĠĠĠĠĠĠ ĠConsumer Config . ENABLE _ AUTO _ COMMIT _ CONFIG Ġto Ġfalse , ĊĠĠĠĠĠĠĠ ĠConsumer Config . KEY _ DE SERIAL IZER _ CLASS _ CONFIG Ġto ĠString Deserializer :: class . java , ĊĠĠĠĠĠĠĠ ĠConsumer Config . VALUE _ DE SERIAL IZER _ CLASS _ CONFIG Ġto ĠString Deserializer :: class . java , ĊĠĠĠĠĠĠĠ ĠConsumer Config . AUTO _ OFFSET _ RESET _ CONFIG Ġto Ġ" ear liest ", ĊĊĠĠĠ Ġ) Ġ+ Ġkafka Config . common Config () Ċ } Ċ