Java Spring Boot + Kafka + Azure Event Hub for Kafka - Creating an Event Producer and Consumer

preview_player
Показать описание
In this video, I am providing an example of how to develop an Event Producer and Consumer using Java Spring Boot.

For the message broker, we will be using Kafka (running on Docker) for a development environment, and as a suggestion for a production environment, we will be using Azure Event Hub for Kafka.

Libraries used:
SpringDoc OpenAPI Starter WebMVC UI

Spring Cloud Starter Stream Kafka

Spring Cloud Azure Starter Integration Event Hubs

Repository with the complete code:

Kafka Configuration (local)
Producer:
spring:
kafka:
bootstrap-servers: localhost:9092
producer:

Consumer:
spring:
kafka:
bootstrap-servers: localhost:9092
consumer:
auto-offset-reset: earliest
properties:

Azure Event Hub for Kafka Configuration
Producer:
spring:
kafka:
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS}
properties:
security:
protocol: SASL_SSL
sasl:
mechanism: PLAIN
producer:

Consumer:
spring:
kafka:
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS}
properties:
security:
protocol: SASL_SSL
sasl:
mechanism: PLAIN
consumer:
auto-offset-reset: earliest
properties:

#java #springboot #kafka #azureeventhub #producer #consumer #eventdriven
Рекомендации по теме
Комментарии
Автор

Content is good but video clarity is not good

shivavenkat
welcome to shbcf.ru