Created
January 17, 2020 13:22
-
-
Save j-tim/954fa3326affa5994c17f21994bb23db to your computer and use it in GitHub Desktop.
Spring Boot / Spring Kafka Avro configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 8082 | |
spring: | |
application: | |
name: "stock-tick-consumer-avro" | |
kafka: | |
bootstrap-servers: localhost:9092 | |
properties: | |
schema.registry.url: http://localhost:8081 | |
# Tells Kafka / Schema Registry that we will be using a specific Avro type | |
# (StockTick type in this case) otherwise Kafka will expect GenericRecord to be used on the topic. | |
specific.avro.reader: true | |
consumer: | |
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer | |
value-deserializer: io.confluent.kafka.serializers.KafkaAvroDeserializer | |
client-id: ${spring.application.name} | |
group-id: ${spring.application.name}-group | |
# At application startup a missing topic on the broker will not fail the | |
# application startup | |
listener: | |
missing-topics-fatal: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment