set offset reset strategy

This commit is contained in:
gulnaz 2025-02-26 17:06:03 +03:00
parent 46282d6283
commit b74d314932

View file

@ -101,6 +101,7 @@ public class ReplyingKafkaConfig {
+ username + "\" password=\"" + password + "\";");
configProps.put(SaslConfigs.SASL_MECHANISM, saslMechanism);
configProps.put(ConsumerConfig.GROUP_ID_CONFIG, groupId + "-" + UUID.randomUUID());
configProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest");
configProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
return configProps;
}