Understanding AsyncAPIs with a Practical Example

Learn how to map a real-world event-driven Microservices architecture into AsyncAPI specification

Dunith Danushka
Tributary Data

--

Event-driven applications are inherently distributed and loosely-coupled. That potentially leads to having many self-contained components in your architecture, managed by multiple teams.

The information exchanged between them must be documented and maintained consistently for everyone’s visibility. AsyncAPI specification steps in to solve that gap.

This post explains how to map a simple event-driven application architecture into corresponding AsyncAPI specifications by walking you through an example.

The event-driven use case

Imagine you are designing a solution to the following use case.

Two event-driven microservices are communicating through a message broker in a publish/subscribe manner. The first service, the Account service, publishes the UserSignedUp event when a new user account is created. The second service, the Email service, subscribed to receive those events to send the new user a welcome email.

We can come up with a simple solution architecture as follows.

The problem

--

--

Dunith Danushka
Tributary Data

Editor of Tributary Data. Technologist, Writer, Senior Developer Advocate at Redpanda. Opinions are my own.