Skip to content

Commit 9bea397

Browse files
committed
the image link was not good
1 parent 2a1d6cd commit 9bea397

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/blog/command-bus-design-pattern/index.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tags: [command-bus, design-patterns, software-architecture]
1515

1616
Let’s start with the basics, what is a bus? In computer science, a bus is a system that connects several components and transfers data between them. In software, those components are called middleware. A middleware processes an incoming request and returns a response. As you can see in the schema below, the main advantage of a bus is that it is highly customizable as you can add as many middleware as you want.
1717

18-
{{< image src="bus.svg" alt="A bus" >}}
18+
{{< image src="bus.png" alt="A bus" >}}
1919

2020
In the next sections, we will speak about the command bus which is often associated with an event bus. Using an event bus is not mandatory but we will see how it will make your application more modular and evolutive. Their goal is to deliver a command or an event to their handler(s). Events and commands are objects used to encapsulate information needed to achieve an action (a command) or to tell what happened in the system (an event).
2121

@@ -29,7 +29,7 @@ In the next sections, we will speak about the command bus which is often associa
2929

3030
Now, we will build a command bus following the same architecture that I described in the previous section. The only difference is that the command bus will return void. As commands canmight be handled asynchronously, we don’t want to wait for the result of the command processing.
3131

32-
{{< image src="command-bus.svg" alt="A command bus" >}}
32+
{{< image src="command-bus.png" alt="A command bus" >}}
3333

3434
Let’s see the most common middleware used to build a command bus. The first one is probably the “logging middleware”. It helps to make your application observable and it is really useful for bug hunting.
3535

@@ -53,7 +53,7 @@ We also don't need the transactional middleware because the event will be proces
5353

5454
As I said previously, events are recorded by aggregates and they should be business oriented. I will share with you two ways to dispatch events into the event bus.
5555

56-
{{< image src="event-bus.svg" alt="A event bus" >}}
56+
{{< image src="event-bus.png" alt="A event bus" >}}
5757

5858
**Solution 1:** You can collect them from your repository if no errors have been raised during the aggregate persisting and then dispatch them.
5959

0 commit comments

Comments
 (0)