Event-driven architecture for microservices

Event-Driven Architecture (EDA) is a way of designing applications and services to respond to real-time information based on the sending and receiving of information about individual event notifications.

Red Hat AMQ Streams is a massively scalable, distributed, and high-performance data streaming platform based on the Apache Kafka project. AMQ Streams provides an event streaming backbone that allows microservices and other application components to exchange data with extremely high throughput and low latency.

 

Read how to run Kafka on OpenShift, the enterprise Kubernetes, with AMQ Streams.

What is EDA?

Event-Driven Architecture (EDA) is a way of designing applications and services to respond to real-time information based on the sending and receiving of information about individual events. EDA is based on asynchronous non-blocking communication between event producers and event consumers that are able to release the resource consumption while waiting for the response to return. Events enhance the decoupling of now well-defined bounded context (DDD) services technically and at runtime becoming the first architectural consideration for cloud and container-native distributed systems. Because more communication patterns are available, multiple consumers can receive events, simultaneously lowering the latency and increasing the throughput.

Customize your response to real-time information and increase your throughput

Not a developer? Learn more about how EDA can help your business move forward.

Why event-driven architecture?

mirrors-real-world

Mirrors real world

The real world is event-driven. Systems generate and respond to events in everyday life (for example, the human central nervous system).

reduced-coupling

Reduced coupling

Traditional RPC-style service architecture results in tightly bound services. Changes to the application flow typically require service code changes. EDA allows new functionality to be added by adding services that consume existing event streams.

encapsulation

Encapsulation

Microservices concepts have grown in popularity due to the ability for service teams to develop services in isolation. EDA means that service designers need not be aware of how events are consumed.

fine-grained-scaling

Fine-grained scaling

Services can be independently scaled up and down to meet the event volume.

near-real-time-latency

Near real-time latency

Customers increasingly expect a near real-time experience. Polling on APIs is a delicate trade-off between responsiveness and load. EDA allow apps to react in near real-time without compromise.

cloud-native-nature

Cloud-native nature

EDA are designed to work perfectly in the distributed world, and cloud-native services are running separately on nodes/servers in the cloud.

Developer EDA session from the Red Hat Summit 2020 virtual event

Did you miss the "Event-driven Architecture with Quarkus, Kafka, and OpenShift" session from 2020 Red Hat Summit? Here's the transcript.

What is an event?

In its basic form, when we are talking about events in an Event-driven Architecture (EDA), we are referring to unusual or important actions or incidents that occur in the system generated by the systems software or hardware components. Though, most of the times the term definition is usually overtaken by the notification message of the event instead. But stepping back and taking a look at all the asynchronous data, you will find more than just notifications, here are some common communication types that should also be taken into consideration when designing a proper cloud native EDA.

Learn more

event

Event

Immutable state and value of a particular entity, which occurred during operation among services.

command

Command

Asynchronized form of Remote Procedure Call, where it contains instructions of telling the recipient what to do, which may cause a change of state in the system.

query

Query

Similar to commands, queries expect a response returning the results, but does not cause any change in state.

What types of events are there?

As events are generated in one of the Event-driven Architecture components and the notifications placed in the channel, the communication pattern used to share then defines also the nature of the messages. For the purpose of better understanding, we have classified events in 3 major types. This event types allow software architects to choose adequate event-driven architecture component implementations.

Learn more

near-real-time-latency

Volatile

The event needs to be disseminated to all consumers online at time of publication. Not persisted.

durable

Durable

Events stored durably until read by all registered consumers. Traditional pub/sub.

replayable

Replayable

Events stored durably for specific period of time or storage capacity. Consumers can move back and forth of the stream.

The Open Source Depot for Apache Kafka Integration Connectors

Check out this curated list of open source Apache Kafka connectors that enable integrations with local systems landscapes.

How do I choose the right solution to implement EDA patterns?

 
  Description Best fit patterns Possible patterns Unsuitable patterns
AMQ Broker

Traditional messaging broker with queuing & Pub/Sub

Rich feature set inc. JMS 2.0

Best-in-class performance

Based on Apache ActiveMQ Artemis

Durable events

Volatile events

Command

Query

Replayable events
AMQ Interconnect

Message router

1:1 (anycast) and 1:many (multicast)

Secure messaging backbone for hybrid cloud

Based on Apache Qpid Dispatch Router

Command

Query

Volatile events

 

Durable events

Replayable events

AMQ Streams

Enterprise distribution of Apache Kafka

Simplified deployment on OpenShift

Based on Kafka and Strimzi

Replayable events

Durable events

Command

Query

Volatile events

Transacted/filtered events

AMQ Online

Scalable, "self-service" on OpenShift

Available self-managed and Red Hat-managed

Based on EnMasse, Artemis & Qpid Dispatch Router

Command

Query

Volatile events

Durable events

  Replayable events
Kafka
Kubernetes

Running Kafka on Kubernetes?

Share data between microservices and other applications with high throughput and low latency. The AMQ streams component
makes Apache Kafka “OpenShift native” through the use of powerful operators that simplify the deployment,

configuration, management, and use of Apache Kafka on OpenShift.