You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: markdown/docs/concepts/application.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,12 @@ weight: 23
5
5
6
6
7
7
## What is an application?
8
-
An application is any computer program or a group of them.
8
+
An _application_ is a computer program or a group of them.
9
9
10
-
An application could also be a micro-service, IoT device (sensor), mainframe process, etc. Users may even write applications in different programming languages if they support one of the selected protocols.
10
+
An application can be a micro-service, IoT (Internet of things) device (for example, a sensor), mainframe process, and more. Users can create applications using various programming languages that support the chosen protocols.
11
11
12
12
## Why do we need applications?
13
-
In Event-Driven Architecture (EDA), an application must be a `producer`, a `consumer`, or both. Applications must also use the protocols the server supports if they wish to connect and exchange messages.
13
+
In Event-Driven Architecture (EDA), an application can either be a producer, a consumer, or both. Additionally, if an application wants to connect and exchange messages with the server, it must adhere to the protocols supported by the server.
14
14
15
15
### Applications: producers and consumers
16
16
```mermaid
@@ -20,4 +20,5 @@ flowchart TD
20
20
C --> D[message]
21
21
D --> F[CONSUMER application]
22
22
```
23
-
The above diagram describes a message communication traveling through a channel between a **PRODUCER application** and a **CONSUMER application**.
23
+
24
+
The diagram above illustrates a message transmission between a Producer application and a Consumer application through a channel.
Copy file name to clipboardExpand all lines: markdown/docs/concepts/asyncapi-document/index.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: 'Introduction'
3
3
weight: 50
4
4
---
5
5
6
-
The AsyncAPI Specification defines a set of fields that can be used in an AsyncAPI document to describe an application's API. The document may reference other files for additional details or shared fields, but it is typically a single, primary document that encapsulates the API description.
6
+
The AsyncAPI Specification defines a set of fields that can be used in an AsyncAPI document to describe an application’s API. While the document may reference other files for additional details or shared fields, it usually serves as a single, primary document that encapsulates the API description.
7
7
8
-
Furthermore, the AsyncAPI document acts as a communication contract between `receivers` and `senders` within an event-driven system. It specifies the payload content required when a service sends a message and offers clear guidance to the receiver regarding the message's properties.
8
+
Furthermore, the AsyncAPI document acts as a communication contract between receivers and senders within an event-driven system. It specifies the payload content necessary for a service to send a message and provides clear guidance to the receiver about the message's properties.
9
9
10
-
```YAML
10
+
```yaml
11
11
asyncapi: 3.0.0
12
12
info:
13
13
title: Cool Example
@@ -37,7 +37,5 @@ operations:
37
37
```
38
38
39
39
<Remember>
40
-
You might have additional fields depending on the implemented protocol (i.e., MQTT, AMQP, Kafka, etc.).
41
-
42
-
For example, your AsyncAPI document could have additional fields for <a href= "https://github.com/asyncapi/bindings/tree/master/kafka">configuring Kafka bindings</a>.
40
+
Depending on the implemented protocol (such as MQTT, AMQP, Kafka, etc.), you may have additional fields in your AsyncAPI document. For example, for <a href= "https://github.com/asyncapi/bindings/tree/master/kafka">configuring Kafka bindings</a>.
Copy file name to clipboardExpand all lines: markdown/docs/concepts/channel.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,10 @@ weight: 20
4
4
---
5
5
6
6
# What is a channel?
7
-
A `channel` is a mechanism created by the server for the organization and transmission of messages. Users can define channels as a _topic, queue, routing key, path,_or _subject_ depending on the protocol used.
7
+
A _channel_ is a mechanism created by the server that facilitates the organization and transmission of messages. Depending on the used protocol, users can define channels as a _topic_, _queue_, _routing key_, _path_, or _subject_.
8
8
9
9
# Why do we need channels?
10
-
Channels play a crucial role in communication between `producers` and `consumers`. A producer can send a message through the channel, and the consumer receives messages from a particular channel. A channel's sole purpose is to ensure the right messages route to the right consumers.
11
-
12
-
10
+
Channels are pivotal for establishing communication between producers and consumers. They enable producers to send messages, while consumers receive messages from specific channels. The primary function of a channel is to ensure that the intended messages reach the appropriate consumers.
13
11
14
12
```mermaid
15
13
graph LR
@@ -19,4 +17,6 @@ graph LR
19
17
C --> E[Consumer]
20
18
C --> F[Consumer]
21
19
```
22
-
The diagram above shows the communication between a `producer` and `consumer`, with the producer sending a `message` through the `channel`. The channel then queues the message to the specific consumer.
20
+
21
+
The diagram above illustrates the communication process between a producer and a consumer. The producer sends a message through the channel, which then queues the message for delivery to the specific consumer.
22
+
The diagram above illustrates the communication process between a producer and multiple consumers. The producer sends a message through the channel, which then queues the message for delivery to the appropriate consumers.
Copy file name to clipboardExpand all lines: markdown/docs/concepts/consumer.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,12 @@ weight: 4
4
4
---
5
5
6
6
## What is a consumer?
7
-
In an Event Driven Architecture (EDA), a consumer is an application that listens for a particular event from a broker and reacts to it.
7
+
A _consumer_is an application that subscribes to a specific event from a broker and responds accordingly.
8
8
9
9
## Why do we need consumers?
10
-
Unlike traditional REST APIs, in EDA, event consumers are not expected to respond immediately on the same connection. In this architecture, a consumer is unaware of the producer or other consumers; all they know is that when a broker sends them an event, it is because they subscribed to it.
10
+
Unlike traditional REST APIs, in Event-Driven Architecture (EDA), event consumers are asynchronous, which means they are not required to respond immediately on the same connection. In this architecture, consumers are unaware of the producers or other consumers. All they know is that when a broker sends them an event, it is because they have subscribed to it.
11
11
12
-
When you want events processed asynchronously in your application, the consumer plays an important role in completing that event data flow in the event channel.
12
+
When you want your application to process events asynchronously, the consumer plays a crucial role in completing the event data flow through the event channel.
13
13
14
14
```mermaid
15
15
flowchart LR
@@ -26,7 +26,8 @@ flowchart LR
26
26
end
27
27
```
28
28
29
-
The above diagram depicts a sample flow of events from `producer` to `broker` to `consumer`. In this instance, the `producer` publishes two events _(A and B)_ and sends them to the `broker`. Then each `consumer` subscribes to receive those events.
29
+
The diagram above illustrates a sample flow of events from the `producer` to the `broker` to the `consumers`. In this scenario, the `producer` publishes two events _(A and B)_ and sends them to the `broker`. Subsequently, each `consumer` subscribes to receive those events.
30
+
30
31
<Remember>
31
32
<b>Subscribers</b> can also be <ahref="https://www.asyncapi.com/docs/concepts/producer">producers</a>.
Copy file name to clipboardExpand all lines: markdown/docs/concepts/message.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@ weight: 30
4
4
---
5
5
6
6
## What is a message?
7
-
A `message` is a communication asset used to transmit or exchange information from a sender to the receiver through `channels`. A single `message` can be consumed by multiple independent receivers and can also be defined as an _event_ or _command_. The sender includes a payload of data (that has been serialized into an appropriate format, e.g., JSON, XML, binary, etc.) that needs to be processed by the receiver. It may also include metadata; information that describes the message itself. This metadata is often known as _headers_ or _properties_.
7
+
A _message_ is a communication asset that transmits or exchanges information from a sender to the receiver through channels.
8
8
9
+
One message can also be defined as an event or command and can be consumed by multiple independent receivers. The sender encodes a payload of data (serialized into a suitable format, such as JSON, XML, binary, or others) that requires processing by the receiver. Additionally, the message may include _metadata_, which is information that describes the message itself. This metadata is commonly referred to as _headers_ or _properties_.
In the diagram above, the sender application transmits a `message`to the receiver application.
21
+
The diagram above illustrates how a sender application transmits a message through a channel to a receiver application, demonstrating the basic flow of message-based communication.
21
22
22
23
## Messages vs Events
23
-
A `message` carries information from one application to the other, while an `event` is a message that provides details of something that has already occurred. One important aspect to note is that depending on the type of information a `message` contains, it can fall under an _event_, _query_, or _command_.
24
-
*See the diagram below.*
24
+
A **message** conveys information between applications, while an **event** is a message that provides details of something that has already occurred. A crucial aspect to note is that depending on the type of information a message carries, it can either be an event, query, or command. Check the diagram below.
25
25
26
26
```mermaid
27
27
graph TD
@@ -32,4 +32,4 @@ graph TD
32
32
C --> E(Command)
33
33
```
34
34
35
-
Overall, `events` are `messages` but not all `messages` are `events`.
35
+
Summing up, events are messages, but not all messages are events.
Copy file name to clipboardExpand all lines: markdown/docs/concepts/producer.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,26 @@ weight: 3
4
4
---
5
5
6
6
## What is a Producer?
7
-
A producer is an application that senses state changes (events) and publishes those events as messages. An event indicates a state change or update triggered by a user's/device's action.
7
+
A _producer_ is an application that detects state changes (_events_) and publishes these events as messages. An event signifies a state change or update triggered by a user’s or device’s action.
8
8
9
9
The following are sample events:
10
-
*Placing an item in a shopping cart on an e-commerce website.
10
+
*Adding an item to a shopping cart on an e-commerce website.
11
11
* Clicking the subscribe button on a YouTube channel.
12
-
* A temperature change in a sensor.
12
+
* Detecting a temperature change using a sensor.
13
+
13
14
14
15
## Why do we need Producers?
15
-
One of the core concepts of event-driven architecture is the publish/subscribe communication model. Producers are publishers in this model; they're the first logical layer responsible for distributing messages to the broker so that others can subscribe to receive messages.
16
+
The publish/subscribe communication model is one of the core concepts of event-driven architecture. In this model, producers are publishers, acting as the first logical layer responsible for distributing messages to the broker, enabling others to subscribe and receive these messages.
16
17
17
18
```mermaid
18
19
flowchart TD
19
20
a[Producer]-- Message 1 --->d[(Broker)]
20
21
d -- Message 1 --->g[Consumer]
21
22
```
22
-
The diagram above depicts the communication between a **producer** publishing events to a specific channel in a **broker** and a **consumer** subscribed to the same channel.
23
23
24
-
In some cases, an entity can be both a producer publishing messages to a specific channel in the broker and a consumer subscribing to messages from a different channel in the broker.
24
+
The diagram above illustrates the communication flow between a producer who publishes events to a specific channel in a broker and a consumer who subscribes to the same channel.
25
+
26
+
In some cases, an entity can simultaneously function as both a producer, publishing messages to a specific channel in the broker, and a consumer, subscribing to messages from a different channel in the broker.
25
27
26
28
```mermaid
27
29
flowchart LR
@@ -31,4 +33,4 @@ flowchart LR
31
33
c -- Message 2 ---> d[Consumer]
32
34
```
33
35
34
-
In the diagram above, we see a producer publishing messages to a specific channel and a consumer subscribing to messages from that channel. We also have a second producer who publishes to one channel, but subscribes to messages from another.
36
+
In the diagram above, there is a producer publishing messages to a specific channel and a consumer subscribing to messages from that channel. Also, there is a second producer publishing to one channel and subscribing to messages from another channel.
Whenever a producer detects a state change (events) and publishes those events as messages, a protocol carries those messages to the channel and then to a consumer. Protocol plays a vital role in message transmission.
17
+
Protocols play a crucial role in message transmission. Whenever a producer detects a state change (events) and publishes those events as messages, a protocol carries those messages to the channel and then to the consumer.
18
18
19
19
```mermaid
20
20
sequenceDiagram
@@ -23,8 +23,8 @@ sequenceDiagram
23
23
Publisher->>+Publisher: Delete(Msg)
24
24
```
25
25
26
-
The diagram above depicts the message exchange flow from `producer` to `broker` to `consumer` using the MQTT protocol with QoS0 (quality of service 0). This means that information exchanged from `producer` to`broker` to `consumer` is delivered at most once.
26
+
The diagram above illustrates the message exchange flow from `producer` to `broker` to `consumer` using the MQTT protocol with QoS0 (quality of service 0). In other words, the information transferred from the producer tobroker to consumer is delivered at most once.
27
27
28
-
The quality of service information rule is specified on a protocol level. Broker implementations and other involved actors must act accordingly.
28
+
The quality of service information rule is defined at the protocol level. Broker implementations and other involved parties must adhere to this rule.
29
29
30
-
In AsyncAPI documents, all protocol-specific details that the application follows can be described using [bindings](/docs/reference/specification/v2.5.0#definitionsBindings).
30
+
In AsyncAPI documents, all protocol-specific details that the application follows can be described using [bindings](https://www.asyncapi.com/docs/reference/specification/latest#definitionsBindings).
Copy file name to clipboardExpand all lines: markdown/docs/concepts/server.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ weight: 2
5
5
6
6
7
7
## What is a server?
8
-
A server represents a messaging broker system where connections and communication between a producer and a consumer are established. Unlike traditional API servers which are dependent on request/response, message broker interactions occur back and forth over different channels.
8
+
A _server_ acts as a _messaging broker_ system, establishing connections and facilitating communication between [_producers_](producer) and [_consumers_](consumer). Unlike traditional API servers that rely on request-response interactions, message broker interactions occur bidirectionally across various channels.
9
9
10
10
## What is the purpose of servers?
11
-
Servers play an important role in maintaining a relationship between producers and consumers. When designing and setting up an event-driven application, servers are in charge of delivering asynchronous messages from the producer to the consumers through the use of channels. By integrating different messaging protocols, servers can transmit and exchange messages between clients.
11
+
Servers play a crucial role in establishing a connection between producers and consumers. In the context of designing and setting up an event-driven application, servers are responsible for delivering asynchronous messages from the producer to the consumers through the use of [_channels_](channel). Additionally, servers can integrate various messaging [_protocols_](protocol) to facilitate the transmission and exchange of messages between _clients_.
12
12
13
13
### Clients and Server
14
14
```mermaid
@@ -18,7 +18,7 @@ flowchart TD
18
18
c[Client Mobile] --> b[(server)]
19
19
b --> c
20
20
```
21
-
The diagram above describes a bi-directional communication between several **clients** and one **server**. In this case, in your AsyncAPI file, you describe the `server`, and therefore the [`Server Object`](https://www.asyncapi.com/docs/reference/specification/latest#serverObject) holds information about the actual server, including its physical location.
21
+
The diagram above illustrates a bidirectional communication between one server and several clients. In this case, in your AsyncAPI file, you describe the `server`, so the [`Server Object`](https://www.asyncapi.com/docs/reference/specification/latest#serverObject) holds information about the actual server, including its physical location.
22
22
23
23
24
24
### Broker Centric
@@ -35,4 +35,4 @@ flowchart TD
35
35
a2 --> C[consumer2]
36
36
```
37
37
38
-
The diagram above shows the *Broker Centric Architecture*. In this case, we created three AsyncAPI files for the `producer`, `consumer1`, and `consumer2`. In these AsyncAPI files, the [`Server Object`](https://www.asyncapi.com/docs/reference/specification/latest#serverObject) provides information about the `broker`, so that API users know where to connect to start receiving or sending messages.
38
+
The diagram above illustrates the Broker-centric Architecture. In this case, there are three AsyncAPI files for the `producer`, `consumer1`, and `consumer2`. In these AsyncAPI files, the [`Server Object`](https://www.asyncapi.com/docs/reference/specification/latest#serverObject) provides information about the `broker`, so that API users know where to connect to start receiving or sending messages.
0 commit comments