concept Kafka in category spring

appears as: Kafka
Spring Microservices in Action, 2E

This is an excerpt from Manning's book Spring Microservices in Action, 2E.

Spring Cloud Stream (https://cloud.spring.io/spring-cloud-stream/) is an enabling technology that allows you to easily integrate lightweight message processing into your microservice. Using Spring Cloud Stream, you can build intelligent microservices that can use asynchronous events as they occur in your application. With Spring Cloud Stream, you can quickly integrate your microservices with message brokers such as RabbitMQ (https://www.rabbitmq.com/) and Kafka (http://kafka.apache.org/).

For this chapter, we’re going to use a lightweight message bus called Kafka (https://kafka.apache.org/). Kafka is a lightweight, highly performant message bus that allows us to asynchronously send streams of messages from one application to one or more other applications. Written in Java, Kafka has become the de facto message bus for many cloud-based applications because it’s highly reliable and scalable. Spring Cloud Stream also supports the use of RabbitMQ as a message bus. Both Kafka and RabbitMQ are messaging platforms.

Listing 10.8 Mapping the licensing service to a message topic in Kafka
#Rest of properties removed for conciseness
spring.cloud.stream.bindings.input.destination=orgChangeTopic    #A
spring.cloud.stream.bindings.input.content-type=application/json
spring.cloud.stream.bindings.input.group= licensingGroup    #B
spring.cloud.stream.kafka.binder.zkNodes= localhost
spring.cloud.stream.kafka.binder.brokers=localhost
Spring Microservices in Action

This is an excerpt from Manning's book Spring Microservices in Action.

Spring Cloud Stream (https://cloud.spring.io/spring-cloud-stream/) is an enabling technology that allows you to easily integrate lightweight message processing into your microservice. Using Spring Cloud Stream, you can build intelligent microservices that can use asynchronous events as they occur in your application. With Spring Cloud Stream, you can quickly integrate your microservices with message brokers such as RabbitMQ (https://www.rabbitmq.com/) and Kafka (http://kafka.apache.org/).

For this chapter, you’re going to use a lightweight message bus called Kafka (https://kafka.apache.org/). Kafka is a lightweight, highly performant message bus that allows you asynchronously send streams of messages from one application to one or more other applications. Written in Java, Kafka has become the de facto message bus for many cloud-based applications because it’s highly reliable and scalable. Spring Cloud Stream also supports the use of RabbitMQ as a message bus. Both Kafka and RabbitMQ are strong messaging platforms, and I chose Kafka because that’s what I’m most familiar with.

Figure 8.4. When organization service data changes it will publish a message to Kafka.

Listing 8.6. Mapping the licensing service to a message topic in Kafka