Skip to content

Commit 0fa0d2d

Browse files
author
Sharifuzzaman Nakib
committed
added image on basic communication. Fixed some urls and did some polishing.
1 parent fb8805c commit 0fa0d2d

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

documentation/docs/concepts/generic-broker.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
The generic broker concept is an abstraction of all the Broker supported by OpenTransit. It contains all the common features of all the supported brokers.
2+
The generic broker concept is an abstraction of all the Brokers supported by OpenTransit. It contains all the common features of all the supported brokers.
33

44
## Common Broker Features
55

@@ -8,11 +8,11 @@ In practice, these common features cover the majority of real-world use cases.
88

99
For example:
1010

11-
- All of them offer a **Publish Endpoint** where messages can be published.
11+
- All of them offer **Publish Endpoints** where messages can be published.
1212
- RabbitMQ calls this an **Exchange**.
1313
- Azure Service Bus, ActiveMQ, and Amazon SNS call it a **Topic**.
1414

15-
- All of them provide a **Receive Endpoint**, typically referred to as a **Queue**, where consumers subscribe.
15+
- All of them provide **Receive Endpoints**, typically referred to as **Queue**, where consumers subscribe.
1616

1717
Producers publish messages to Publish Endpoints, and Consumers subscribe to Receive Endpoints.
1818

documentation/docs/patterns/commands-and-events/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Examples:
5050
The messages and Consumers classes are kept on the **Shared** Project.
5151

5252
### Command Implementation
53-
Since the [Receive Endpoint](generic-broker.md#receive-endpoint) natively implements the [Competing Consumers Pattern](https://www.enterpriseintegrationpatterns.com/patterns/messaging/CompetingConsumers.html),
53+
Since the [Receive Endpoint](../../concepts/generic-broker.md#receive-endpoint) natively implements the [Competing Consumers Pattern](https://www.enterpriseintegrationpatterns.com/patterns/messaging/CompetingConsumers.html),
5454
no additional configuration is needed.
5555

5656
In the [Example Project](https://github.com/OpenTransitLab/Tutorials/tree/main/CommandsAndEvents) you will see both **ApplicationA** and **ApplicationB** subscribed for the `ProcessOrder` message.

documentation/docs/tutorials/basic-communication.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ In this example, messages are published from two places:
6565
- From inside the **SubmitOrderConsumer**
6666
[!code-csharp[](code-sample/OrderService.SubmitOrderConsumer.cs#L6-L18)]
6767

68-
Both `IBus` and `ConsumeContext<T>` act as Producers, because you can call `Publish(T message)` on either of them.
68+
Both `IBus` and `ConsumeContext<T>` are Producers. You may call `Publish(T message)` on either of them.
6969

7070
When publishing inside a [Consumer](#publishing-from-inside-a-consumer), it is **highly recommended** to use the `ConsumeContext<T>` Producer as we have done in the SubmitOrderConsumer. We’ll discuss why in the dedicated Producers section.
7171

@@ -106,16 +106,17 @@ In this step, we perform three main tasks:
106106

107107
3. **Register the consumers**(if any)
108108

109-
All the above 3 tasks is done onthe `Program.cs` of OrderService
109+
All the above 3 tasks is done on the `Program.cs` of OrderService
110110
[!code-csharp[](code-sample/OrderService.Program.cs#L12-L25)]
111111

112+
However, the Client doesn't consume any messages. So no Consumer is registered, and the `ConfigureEndpoints()` method isn't called.
112113

113114
---
114115

115116
### 5. The Topology:
116117

117-
This example uses **[broker-agnostic](../concepts/topology#broker-agnostic-way)** configuration, so you don’t need to understand the underlying broker [topology](../concepts/topology) for basic communication.
118-
Here, we only used the `UsingRabbitMq` method to provide the Connection Configuration and to configure the Publish and Receive [Endpoints](../concepts/generic-broker#generic-broker-terminologies)(a generic concept among all the brokers) on the broker.
118+
This example uses **[broker-agnostic](../concepts/topology#broker-agnostic-way)** configuration, so you don’t need to understand the broker's internal [topology](../concepts/topology) for basic communication.
119+
Here, we only used the `UsingRabbitMq` method to provide the Connection Configuration and to configure the Publish and Receive [Endpoints](../concepts/generic-broker#endpoints)(a generic concept among all the brokers) on the broker.
119120

120121
Since this Configurations aren't RabbitMQ specific, and you may use any other broker here and, the Message Communication would work fine. We will add examples with other brokers soon.
121122

@@ -125,6 +126,8 @@ Since this Configurations aren't RabbitMQ specific, and you may use any other br
125126
In this project, we work with two message types: **SubmitOrder** and **ProcessOrder**.
126127
Based on these message types, the topology is set up in the following way:
127128

129+
![ Generic Broker Topology](/images/tutorials/basic-communication/topology.png)
130+
128131
1. **Two Publish Endpoints and Two Receive Endpoints are created**, one pair for each message type.
129132
2. Each `IConsumer<T>` is automatically subscribed to the **Receive Endpoint** for its message type **T**.
130133
3. When you call `Publish(T message)`, the message is sent to the corresponding **Publish Endpoint** for type **T**.
@@ -136,7 +139,7 @@ Based on these message types, the topology is set up in the following way:
136139
#### Broker's internal topology
137140

138141
# [RabbitMQ](#tab/rabbitmq)
139-
However, knowing the underlying broker [topology](../concepts/topology) is very helpful when debugging message-routing issues.
142+
However, knowing the broker's internal [topology](../concepts/topology) is very helpful when debugging message-routing issues.
140143

141144
In our example, Each Consumer is consuming a single message type.
142145
Here, for each MessageType, 2 **Exchanges** and one **Queue** are being created.
36 KB
Loading

0 commit comments

Comments
 (0)