How to install Event Broker Tools | Mendix 10
Tags: mendix, webdev, events, broker
Published: 2023-09-05 22:53:19

{% youtube F_8vcz10SxQ %}

"Event Broker" is a mechanism that enables communication and the flow of events between different parts of an application or between different microservices in an event-driven architecture.
It plays a crucial role in building scalable and flexible applications, allowing different parts of the application to respond to events and interact with each other asynchronously.

## Prerequisites to this tutorial

- Git Installed
[https://git-scm.com/downloads](https://git-scm.com/downloads)

## Attention!
In order to be able to follow this tutorial, it is recommended to do the tutorial regarding Business Events first.
https://medium.com/@mendixwithme/how-to-use-business-events-mendix-10-219ca7759514

## Step by Step
1º Install Visual Studio Code and Docker.
VSCode: [https://code.visualstudio.com/download](https://code.visualstudio.com/download)
Docker: [https://www.docker.com/products/docker-desktop/](https://www.docker.com/products/docker-desktop/)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28u7d6hicj2n7g91718b.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9bv8n5et4knqyp9qylbh.png)


2º Access "Event Broker Tools" page on Github and clone the repository by clicking on the "Code" button and copying the HTTPS link.
Github: https://github.com/mendix/event-broker-tools
Open a Git terminal inside the Mendix Folder and write "git clone https://github.com/mendix/event-broker-tools.git". Press Enter and wait.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7rr8t85ezv718zmvr0g.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qq4ko4o26lp80n7gb517.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xz8ln0k41hryb8h5mvej.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhpcv89uv08ex3isg9uy.png)


3º Open the Visual Studio Code.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d0rpkjr3umids1j1y24f.png)



4º Select the Extension tab on the Side Menu and Search for "Docker". Select and install the Extension created by Microsoft.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eq2euboij199kn4y1w12.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9zdaodl8c0d1yppvp5t.png)


5º After install, restart the VSCode and Open the folder with the cloned repository.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gapojgntzyh237zqovw1.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cigvmjcjkabdd8sa1llq.png)

6º On the right side, go to the "local-setup" folder and right click on the "docker-compose.yml" file. Select the "Compose Up" option.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44r5oq2hx9cvtsjocrxb.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5tqexhxdfjrsu4qw28gw.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggg3jb4nsfu1xzn7cipr.png)


7º Go to BusinessEvents3 project (Check BusinessEvents tutorial if you don't have this project) and click on "Settings". Create a new configuration.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zf0c6y8e0648rc2buob1.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1rkh1x5gq8nhp9qkexd.png)


8º As a Name, write "BusinessEventLocalTest". Under the tab "Constants", add two new constants:
Name: BusinessEvents.ChannelName
Value: 'local'
Name: BusinessEvents.ServerUrl
Value: 'localhost:9092' (Windows) or
'YOUR-IPADDRESS:9094' (Linux/MACOS)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ly05f5jder105cy1dzan.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/twecbzfh7cvnbadj5qdc.png)




9º Click to "Activate" the new configuration. Run the project locally.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/65n0tp9zbyxy3qvv9eye.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pes4lqg0dx220l3l2k1b.png)




10º Do the same to the second app. Go to BusinessEvents4 project and click on "Settings". Create a new configuration.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nbevtiv79j1f40gumspu.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o225v5dwjpw5w1rdummq.png)




11º Write "BusinessEventLocalTest" and under the tab "Server" change the "Runtime port" to "8081" and "Admin port" to "8091". We are changing this to be possible to execute both application at the same time.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqenidwffrtodemesk8s.png)

12º Add two new constants:
Name: BusinessEvents.ChannelName
Value: 'local'
Name: BusinessEvents.ServerUrl
Value: 'localhost:9092' (Windows) or
'YOUR-IPADDRESS:9094' (Linux/MACOS)
It is important to check if your new configuration is active.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34l6v8mq8ho7et0g7sxk.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tu13bq3clqsn9g1f5np5.png)




13º Run the project.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hfp30o88ae8ikztzf0cc.png)



14º Inside the VSCode, confirm if all the topics have "Created" or "Started" after it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r50gxqfbxm3ungna0hoh.png)



15º Create a new Order object, selecting "Pending" as the order status.
Create a new Shipping object with the same status.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmdl4gmlqr98ykqmwg57.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rh4ys30xo7b0jyx0a334.png)




16º Go back to the first application and change the "order status" to "Cancelled". Return to the Shipping app and refresh the page. If everything went well, you should the "Shipping Status" as "Cancelled"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jh8dm7gvayn7vdo2srdb.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x2a5ljyvfxvqd3c83eww.png)




---

This is the end of the tutorial.
I'm creating a mendix community on discord to make life easier for devs. You can ask questions, help other people and have access to all the tutorials.
If you want to be part of this community, you can do so through this invite.
Discord: [https://discord.gg/YHre8dXz3q](https://discord.gg/YHre8dXz3q)

---

**_From the writer_**
If you enjoyed this article you can find more on our [Medium page](https://medium.com/r/?url=https%3A%2F%2Fmendixwithme.medium.com%2F). For great videos, you can visit our [Youtube page](https://medium.com/r/?url=https%3A%2F%2Fwww.youtube.com%2Fchannel%2FUCtRcKyh_4dvK-uCBtnbUWFw).
Are you interested in getting more involved with our community? Join us in our [Discord Community Channel](https://discord.gg/YHre8dXz3q).