Configuration properties for Kafka

Let's see the following application.yml configuration file for a microservice:

spring:
application:
name: customer-service
cloud:
stream:
kafka:
binder:
brokers:
- localhost:9092
bindings:
notification-in:
destination: notification
contentType: application/json
notification-out:
destination: notification
contentType: application/json

As you can see, this file configures the address of the Kafka server to connect to, and the Kafka topic we use for both the inbound and outbound streams in our code. The contentType properties tell Spring Cloud Stream to send or receive our message objects as strings in the streams.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.107.193