-
-
Notifications
You must be signed in to change notification settings - Fork 540
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: add new consumer concept doc #991
Changes from 5 commits
f171035
3c8db99
1709086
662770b
f253097
45b9939
608a3c9
9b57577
c20ae42
030f057
8a02d1a
a7b01a2
f53b7d6
637ba03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,28 @@ | ||||||
--- | ||||||
title: Consumer | ||||||
weight: 4 | ||||||
--- | ||||||
|
||||||
## What is a Consumer? | ||||||
In an Event Driven Architecture (EDA), a consumer is a component of an application or messaging system that listens for a particular event from a broker and takes the necessary action in response. | ||||||
|
||||||
## What is the purpose of Consumers? | ||||||
Unlike traditional RestAPIs, EDA creates a setting where there is never a wait for requests or responses to an event. In this pattern, a consumer is unaware of the producer or other consumers; all they know is that when a broker sends them an event they are subscribed to, they receive it. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
how about this? just to clarify about communication that it is not on sync, because sometimes people do request/response in EDA, but it is still async. Like in DM on Slack, you send question, you do not know who will answer, but you definitely expect that in a thread at some point of time someone will send a response. Makes sense you can freely adjust the paragraph, my suggestions are just to "visualize" what I mean |
||||||
|
||||||
When you want events processed asynchronously in your application, the consumer plays an important role in completing that flow of event data in the event channel. | ||||||
|
||||||
```mermaid | ||||||
flowchart LR | ||||||
a[Producer] -- Event A --->c[(Broker)] | ||||||
a -- Event B ---> c | ||||||
c -- Event A ---> d[Consumer A] | ||||||
c -- Event A ---> e[Consumer B] | ||||||
c -- Event B ---> e[Consumer B] | ||||||
c -- Event B ---> f[Consumer C] | ||||||
subgraph Consumers | ||||||
d | ||||||
e | ||||||
f | ||||||
end | ||||||
``` | ||||||
The diagram above depicts an example of the flow of events from a producer to a broker and then to the consumers. In this instance, the producer publishes two events, A & B and sends to the broker. Then each consumer receives events from what it is subscribed to. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is good to be consistent with producer document that was just released
I would avoid
response
as it is known term in request/response pattern, and might be suggest consumer sends a response