Skip to content

Commit

Permalink
hotfix: change serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
ohksj77 committed Oct 16, 2023
1 parent ccb521f commit 658c80c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.RequiredArgsConstructor;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -51,7 +52,7 @@ public ConsumerFactory<String, String> consumerFactory() {
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
props.put(ConsumerConfig.GROUP_ID_CONFIG, groupId);
props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JsonDeserializer.class);
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringSerializer.class);
props.put(JsonDeserializer.VALUE_DEFAULT_TYPE, String.class);

return new DefaultKafkaConsumerFactory<>(props);
Expand Down

0 comments on commit 658c80c

Please sign in to comment.