Skip to content

suyashs52/kafka-avro

Repository files navigation

Document Title

Spring Boot, spring-kafka and Confluent Schema Registry integration example

Local and CCloud

run zookeeper
run kafka
run schema registry
to use on windows put bat file to confluent/bin/windows
use cmd navigate to windows folder run command schema-registry-start.bat <path to schema registry properties>

Deploy app to PAS

link:kafka.json[role=include]
filename
./mvnw clean install -DskipTests=true

cf create-user-provided-service cp -p kafka.json

cf push --no-start

cf bind-service spring-kafka-avro cp

cf start spring-kafka-avro

Test the app

test
curl -X POST -d 'name=vik&age=33' spring-kafka-avro-sleepy-dugong.apps.sanaa.cf-app.com/user/publish

kafka-avro-console-consumer --bootstrap-server kafka.supergloo.com:9092 --consumer.config kafka.properties --topic users --from-beginning --property schema.registry.url=http://schemaregistry.supergloo.com:8081