Skip to content

Commit

Permalink
#509, fixes issue with serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Sep 14, 2023
1 parent 1a3ab44 commit 6a73a1f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions catalog-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ spring.webflux.base-path=/${spring.application.name}

#Producer
# spring.cloud.stream.kafka.binder.brokers=localhost:9092
spring.cloud.stream.kafka.binder.enableObservation=true

spring.cloud.stream.bindings.inventory-out-0.destination=productTopic
spring.cloud.stream.bindings.inventory-out-0.contentType=application/json
#To use custom serializer we should use native encoding as true
spring.cloud.stream.bindings.inventory-out-0.producer.use-native-encoding=true

#use either below for all topics or below two if you want saperate serializers
spring.cloud.stream.kafka.default.producer.configuration.key.serializer=org.apache.kafka.common.serialization.StringSerializer
spring.cloud.stream.kafka.default.producer.configuration.value.serializer=org.springframework.kafka.support.serializer.JsonSerializer

#spring.cloud.stream.kafka.bindings.inventory-out-0.producer.configuration.key.serializer=org.apache.kafka.common.serialization.StringSerializer
#spring.cloud.stream.kafka.bindings.inventory-out-0.producer.configuration.value.serializer=org.springframework.kafka.support.serializer.JsonSerializer


application.inventory-service-url=http://localhost:18181/inventory-service

0 comments on commit 6a73a1f

Please sign in to comment.