Skip to content

Instantly share code, notes, and snippets.

@j-tim
Created January 17, 2020 13:11
Show Gist options
  • Save j-tim/5e46d283ced5afb9ecaaa580ee9c6935 to your computer and use it in GitHub Desktop.
Save j-tim/5e46d283ced5afb9ecaaa580ee9c6935 to your computer and use it in GitHub Desktop.
Spring Boot / Spring Kafka Avro configuration
server:
port: 8080
spring:
application:
name: "stock-tick-producer-avro"
kafka:
bootstrap-servers: localhost:9092
properties:
# Schema Registry Connection parameter
schema.registry.url: http://localhost:8081
producer:
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: io.confluent.kafka.serializers.KafkaAvroSerializer
client-id: ${spring.application.name}
stockTick:
producer:
# Mimic the stock exchange create a random stock tick every configured milliseconds
rateInMs: 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment