Spring Cloud Stream and Spring Cloud Function technologies support the implementation of event-driven microservices for diverse use cases, ranging from application integration to data streaming. Oleg Zhurakousky, project lead for Spring Cloud Stream and Spring Cloud Function, spoke at SpringOne Platform 2019 Conference about the recent developments and features in both of these projects.
He started the presentation by defining what an event-driven architecture is: a software architecture paradigm promoting the production, detection, consumption of, and reaction to events. Unlike the case with traditional data, the events don't move, they occur. The events rely on network-based systems to communicate.
Zhurakousky said that events should carry enough information for the consumer program to act on the event generated. Events typically consists of:
- Event payload
- Event meta-data (which includes time, id, source, type, etc)
Reactions to events can be of different types: process, process & forward and delegate. He also discussed the different types of event processing, which includes the following:
- Simple event processing
- Streaming event processing
- Complex event processing
He showed the audience several demos on how to use Spring Cloud Stream and Spring Cloud Function API for developing event-driven solutions. One of the demos included a reactive solution using Project Reactor with RabbitMQ binder to accumulate group of events and analyze them. He stated that "you just need to add Spring Cloud Stream to classpath and everything works; bascially, the Function becomes a message handler."
Zhurakousky also spoke at the conference about Spring Cloud Function: Write Once, Run Anywhere and Streaming with Spring Cloud Stream and Apache Kafka.