SlideShare a Scribd company logo
1 of 10
Messaging with Spring
Cloud Stream
Spring Cloud Stream
Spring Cloud Stream is a lightweight message-driven microservices framework
based on Spring Integration and Spring Boot, providing the opinionated runtime
for easy configuration.
It provides a simple declarative model for sending and receiving messages using
RabbitMQ ,Apache Kafka or Amazon Kinesis.
SCS decouples the messaging between producers and consumers, by creating
bindings that can be used out of the box. In other words,we need not add broker-
specific code to your application for producing or consuming messages. We just
add the required binding dependencies to the application and Spring Cloud
Stream will take care of the messaging connectivity and communication
Spring Cloud Stream Programming Model
● Spring Cloud Stream uses channels (input/output) as a mechanism to send
and receive messages. A Spring Cloud Stream application can have any
number of channels, and it defines two annotations: @Input on
SubscribableChannel class for incoming messages and @Output on
MessageChannel class for sending outgoing messages. These classes
comes from Spring Integration.
● Instead of using these channels directly , SCS has added three interfaces
which is much simplified and covers most common messaging use cases
- Source , Processor and SInk
Spring Cloud Stream Programming Model
SCS interfaces involved in publishing and consuming the message
● Source
● Processor
● Sink
Spring Cloud Stream Concepts
● Source
A source is a Spring annotated interface that takes a Plain Old Java Object
(POJO) that represents the message to be published. A source takes the
message, serializes it (the default serialization is JSON), and publishes the
message to a channel. A source is used in an application where you are
ingesting data from an external system (by listening into a queue, a REST
call, file system,database query, etc.) and sending it through an output
channel.
Spring Cloud Stream Concepts
● Processor
Processor is a Spring annotated interface used in an application when you
want to start listening from the input channel for new incoming messages,
process the message received (enhancements, transformations, etc.), and
send a new message to the output channel.
Spring Cloud Stream Concepts
● Sink
A sink listens to a channel for incoming messages and de-serializes the
message back into a plain old Java object. From there, the message can be
processed by the business logic of the service or end the flow (saving data,
firing a task, logging into the console, etc.).
Source to Sink Model
Source to Processor to Sink Model
Source to Processor to Sink Model

More Related Content

What's hot

Reactive programming
Reactive programmingReactive programming
Reactive programmingsaykopatt
 
Reactive programming and RxJS
Reactive programming and RxJSReactive programming and RxJS
Reactive programming and RxJSRavi Mone
 
Introduction to MicroProfile Metrics
Introduction to MicroProfile MetricsIntroduction to MicroProfile Metrics
Introduction to MicroProfile MetricsKenji HASUNUMA
 
How to adapt MicroProfile API for generic Web applications
How to adapt MicroProfile API for generic Web applicationsHow to adapt MicroProfile API for generic Web applications
How to adapt MicroProfile API for generic Web applicationsKenji HASUNUMA
 
Fast SOA with Apache Synapse
Fast SOA with Apache SynapseFast SOA with Apache Synapse
Fast SOA with Apache SynapsePaul Fremantle
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryJoshua Long
 
Reactive programming with rx java
Reactive programming with rx javaReactive programming with rx java
Reactive programming with rx javaCongTrung Vnit
 
Streaming Data with Apache Kafka
Streaming Data with Apache KafkaStreaming Data with Apache Kafka
Streaming Data with Apache KafkaMarkus Günther
 
Soa 31 jax ws server side development architecture
Soa 31 jax ws server side development architectureSoa 31 jax ws server side development architecture
Soa 31 jax ws server side development architectureVaibhav Khanna
 
S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchGunnar Hillert
 
Developing real-time data pipelines with Spring and Kafka
Developing real-time data pipelines with Spring and KafkaDeveloping real-time data pipelines with Spring and Kafka
Developing real-time data pipelines with Spring and Kafkamarius_bogoevici
 
BlazeDS
BlazeDS BlazeDS
BlazeDS Priyank
 
Mobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValueMobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValueRapidValue
 

What's hot (20)

Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Reactive programming and RxJS
Reactive programming and RxJSReactive programming and RxJS
Reactive programming and RxJS
 
Spring integration
Spring integrationSpring integration
Spring integration
 
Introduction to MicroProfile Metrics
Introduction to MicroProfile MetricsIntroduction to MicroProfile Metrics
Introduction to MicroProfile Metrics
 
How to adapt MicroProfile API for generic Web applications
How to adapt MicroProfile API for generic Web applicationsHow to adapt MicroProfile API for generic Web applications
How to adapt MicroProfile API for generic Web applications
 
Apache ActiveMQ
Apache ActiveMQ Apache ActiveMQ
Apache ActiveMQ
 
Remoting and serialization
Remoting and serializationRemoting and serialization
Remoting and serialization
 
Fast SOA with Apache Synapse
Fast SOA with Apache SynapseFast SOA with Apache Synapse
Fast SOA with Apache Synapse
 
Dataweave nagarjuna
Dataweave nagarjunaDataweave nagarjuna
Dataweave nagarjuna
 
Load Balancing Server
Load Balancing ServerLoad Balancing Server
Load Balancing Server
 
Mule Batch Commit
Mule Batch CommitMule Batch Commit
Mule Batch Commit
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud Foundry
 
How To Scale v2
How To Scale v2How To Scale v2
How To Scale v2
 
Reactive programming with rx java
Reactive programming with rx javaReactive programming with rx java
Reactive programming with rx java
 
Streaming Data with Apache Kafka
Streaming Data with Apache KafkaStreaming Data with Apache Kafka
Streaming Data with Apache Kafka
 
Soa 31 jax ws server side development architecture
Soa 31 jax ws server side development architectureSoa 31 jax ws server side development architecture
Soa 31 jax ws server side development architecture
 
S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring Batch
 
Developing real-time data pipelines with Spring and Kafka
Developing real-time data pipelines with Spring and KafkaDeveloping real-time data pipelines with Spring and Kafka
Developing real-time data pipelines with Spring and Kafka
 
BlazeDS
BlazeDS BlazeDS
BlazeDS
 
Mobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValueMobility Information Series - Webservice Architecture Comparison by RapidValue
Mobility Information Series - Webservice Architecture Comparison by RapidValue
 

Similar to Spring cloud stream overview

quickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integrationquickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integrationjorgesimao71
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageDamien Dallimore
 
Dataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice WayDataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice WayJosef Adersberger
 
Real time data-pipeline from inception to production
Real time data-pipeline from inception to productionReal time data-pipeline from inception to production
Real time data-pipeline from inception to productionShreya Mukhopadhyay
 
How the WSO2 ESB outperforms other major open source esb vendors
How the WSO2 ESB outperforms other major open source esb vendorsHow the WSO2 ESB outperforms other major open source esb vendors
How the WSO2 ESB outperforms other major open source esb vendorsWSO2
 
Connecting mq&kafka
Connecting mq&kafkaConnecting mq&kafka
Connecting mq&kafkaMatt Leming
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streamingphanleson
 
How a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdfHow a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdfarccreation001
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a databaseSon Nguyen
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Conceptspasam suresh
 
Implementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMixImplementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMixAdrian Trenaman
 
Mule getting started
Mule getting startedMule getting started
Mule getting startedKarim Ezzine
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02dvicky12
 
web programming
web programmingweb programming
web programmingshreeuva
 

Similar to Spring cloud stream overview (20)

quickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integrationquickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integration
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the message
 
Dataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice WayDataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice Way
 
Real time data-pipeline from inception to production
Real time data-pipeline from inception to productionReal time data-pipeline from inception to production
Real time data-pipeline from inception to production
 
How the WSO2 ESB outperforms other major open source esb vendors
How the WSO2 ESB outperforms other major open source esb vendorsHow the WSO2 ESB outperforms other major open source esb vendors
How the WSO2 ESB outperforms other major open source esb vendors
 
Axis2
Axis2Axis2
Axis2
 
Connecting mq&kafka
Connecting mq&kafkaConnecting mq&kafka
Connecting mq&kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streaming
 
How a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdfHow a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdf
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a database
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
Implementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMixImplementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMix
 
Mule getting started
Mule getting startedMule getting started
Mule getting started
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02
 
web programming
web programmingweb programming
web programming
 
Web Service
Web ServiceWeb Service
Web Service
 
Chat server
Chat server Chat server
Chat server
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Spring cloud stream overview

  • 2. Spring Cloud Stream Spring Cloud Stream is a lightweight message-driven microservices framework based on Spring Integration and Spring Boot, providing the opinionated runtime for easy configuration. It provides a simple declarative model for sending and receiving messages using RabbitMQ ,Apache Kafka or Amazon Kinesis. SCS decouples the messaging between producers and consumers, by creating bindings that can be used out of the box. In other words,we need not add broker- specific code to your application for producing or consuming messages. We just add the required binding dependencies to the application and Spring Cloud Stream will take care of the messaging connectivity and communication
  • 3. Spring Cloud Stream Programming Model ● Spring Cloud Stream uses channels (input/output) as a mechanism to send and receive messages. A Spring Cloud Stream application can have any number of channels, and it defines two annotations: @Input on SubscribableChannel class for incoming messages and @Output on MessageChannel class for sending outgoing messages. These classes comes from Spring Integration. ● Instead of using these channels directly , SCS has added three interfaces which is much simplified and covers most common messaging use cases - Source , Processor and SInk
  • 4. Spring Cloud Stream Programming Model SCS interfaces involved in publishing and consuming the message ● Source ● Processor ● Sink
  • 5. Spring Cloud Stream Concepts ● Source A source is a Spring annotated interface that takes a Plain Old Java Object (POJO) that represents the message to be published. A source takes the message, serializes it (the default serialization is JSON), and publishes the message to a channel. A source is used in an application where you are ingesting data from an external system (by listening into a queue, a REST call, file system,database query, etc.) and sending it through an output channel.
  • 6. Spring Cloud Stream Concepts ● Processor Processor is a Spring annotated interface used in an application when you want to start listening from the input channel for new incoming messages, process the message received (enhancements, transformations, etc.), and send a new message to the output channel.
  • 7. Spring Cloud Stream Concepts ● Sink A sink listens to a channel for incoming messages and de-serializes the message back into a plain old Java object. From there, the message can be processed by the business logic of the service or end the flow (saving data, firing a task, logging into the console, etc.).
  • 9. Source to Processor to Sink Model
  • 10. Source to Processor to Sink Model