Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update docs to explain relationship between operations, Consumers, and Producers #3715

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ onUserSignUp:
title: User sign up
summary: React and process information about new user sign up.
description: Process information about user sign up and update the information in the table that counts numbers of currently signed up users.
action: receive
action: receive (Consumer)
channel:
$ref: '#/channels/userSignup'
```
Expand All @@ -52,3 +52,11 @@ Some fields are missing from this example:
- No `messages` field means that this operation processes any message coming from the `userSignup` channel.
- No `security` field means that there are no special security measures related to this operation and that the security should be applied the same as for other operations. Essentially, the security from the server level should be respected.
- No `reply` field means that after reacting to the user sign up, this application will not send any reply as a reaction.

## Relationship between Operations, Consumers, and Producers

Operations in AsyncAPI are closely related to the high-level concepts of Consumers and Producers. A Producer is an application that sends messages, while a Consumer is an application that receives messages. In the context of AsyncAPI operations:
- An operation with the `action` set to `send` corresponds to a Producer.
- An operation with the `action` set to `receive` corresponds to a Consumer.

Understanding this relationship helps in designing and documenting the interactions between different components in an event-driven architecture. For more details on Consumers and Producers, refer to the [Consumer](/docs/concepts/consumer) and [Producer](/docs/concepts/producer) pages.
2 changes: 2 additions & 0 deletions markdown/docs/concepts/consumer.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ The diagram above illustrates a sample flow of events from the `producer` to the
<Remember>
<b>Subscribers</b> can also be <a href="https://www.asyncapi.com/docs/concepts/producer">producers</a>.
</Remember>

For more details on how operations link to the high-level concepts of Consumers and Producers, refer to the [Adding operations](/docs/concepts/asyncapi-document/adding-operations) page.
2 changes: 2 additions & 0 deletions markdown/docs/concepts/producer.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ flowchart LR
```

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.

For more details on how operations link to the high-level concepts of Consumers and Producers, refer to the [Adding operations](/docs/concepts/asyncapi-document/adding-operations) page.
Loading