100% found this document useful (1 vote)
220 views13 pages

Event-Driven Microservices With Spring Boot and Activemq

The document discusses event-driven microservices architecture using Spring Boot and ActiveMQ. It defines event-driven architecture as a pattern where applications asynchronously produce and consume events via an event broker. It describes the three main components - event producers that publish events, event routers that filter and route events, and event consumers that receive events and take action. It provides examples of message brokers for both message-based and data pipeline systems, and gives an example of how an online B2B store could implement event-driven architecture across microservices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
220 views13 pages

Event-Driven Microservices With Spring Boot and Activemq

The document discusses event-driven microservices architecture using Spring Boot and ActiveMQ. It defines event-driven architecture as a pattern where applications asynchronously produce and consume events via an event broker. It describes the three main components - event producers that publish events, event routers that filter and route events, and event consumers that receive events and take action. It provides examples of message brokers for both message-based and data pipeline systems, and gives an example of how an online B2B store could implement event-driven architecture across microservices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Event-Driven

Microservices
With Spring Boot
and ActiveMQ
Microservices architecture
What is event-driven architecture?
• Event-driven architecture (EDA) is a software design pattern
• Different application can asynchronously produce and consume events/messages via an event
broker/message broker
• Application communicate with each other by sending and/or receiving events or messages
“asynchronous”
• Event-driven architectures have three main
components:

What is event- • Event producers: publish events to the


router

driven
• Event routers: filters, processes and routes
the events to consumers
• Event consumers: receive the event

architecture? and take action on them


What is event-
driven
architecture?
• Event-driven apps can be created in any
programming language.
• An event-driven architecture is asynchronous,
distributed, performance, more reliable, high
scale
Event/Message Broker Software:

Apache
RabbitMQ ActiveMQ SQS ZeroMQ
Kafka

Redis
MSMQ IronMQ Kinesis RocketMQ
Pub/sub
Event/Message Broker Software:

Message Base Data Pipeline

RabitMQ Kafka
ActiveMQ Kinesis
SQS RocketMQ
ZeroMQ
MSMQ
IronMQ
Redis Pub/sub
Event/Message Broker Software:

Message Base Data Pipeline

Save the states of consumers to ensure that all Don't save consumer's state
consumers receive messages from the subscribed topic.

After all the consumers receive the message, the Messages are deleted after a certain amount of time
message is deleted.

Suitable as a system for exchanging messages between Usually is an event Sourcing system or data
services. synchronization system from different databases.
An Online B2B
store
• In a microservices architecture, the ORDER and
CUSTOMER tables reside in different services.
• The Order Service cannot access the
CUSTOMER table directly. It can only use the
API provided by Customer Service.
An Online
B2B store
• The Order Service creates an Order with the
status NEW and publishes the Order Created
event.
An Online
B2B store
• Customer Service listens and processes
(consume) the Create Order event by reserving
credit for this order and publishing the Credit
Reserved event.
An Online
B2B store
• The Order Service listens and handles the Credit
Reserved event and changes the status of the
order to OPEN.
Demo

You might also like