Example to ilustrate AsycAPI generator From AsynApi spec i've created a springboot project
1- Create asyncapi spec 2- Install AsynApiGenerator
npm install -g @asyncapi/generator
2- Run generator I've customized package, use actuator and useServers
ag -p javaPackage=com.paradigma.poc.asyncapi -p useServers=true -p actuator=true ./asyncapi.yaml https://github.com/asyncapi/java-spring-cloud-stream-template.git
3- Config confluent cloud server and topic link
4- Config security resource application
spring:
cloud:
stream:
kafka:
binder:
brokers: 'pkc-6ojv2.us-west4.gcp.confluent.cloud:9092'
configuration.sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username='AMJ4GS6GS7FVZPTY' password='XXX';"
configuration:
sasl:
mechanism: PLAIN
security:
protocol: SASL_SSL
5- Run generator
mvn clean install
6- Run app
mvn spring-boot:run
7- Check the console and the topic