How to install Event Broker Tools | Mendix 10

Mendix With Me
Mendix Community
Published in
5 min readSep 5, 2023

--

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

Attention!

Step by Step

1º Install Visual Studio Code and Docker.
VSCode: https://code.visualstudio.com/download
Docker: https://www.docker.com/products/docker-desktop/

Download VSCode
Download Docker

2º Access the “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.

Event Broker Tools” page on GitHub
Click on the Code button
Git Terminal
Git clone process

Open the Visual Studio Code.

New VSCode instance

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

Extension tab
Docker Extension

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

New VSCode Instance
Select “Event Broker Tools” Folder

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.

Folder Structure
File Options
Composing file

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

Project Settings
New Configuration

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)

Constants configuration page
Add new constants

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

New config created is active
Run the project

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

Project Settings
New configuration

11º Write “BusinessEventLocalTest” and under the tab “Server” change the “Runtime port” to “8081” and “Admin port” to “8091”. We are changing this to make it possible to execute both applications at the same time.

Server configuration

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.

Constants setup
Active configuration

13º Run the project.

Run the project

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

Compose Up finished

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

New order object
New shipping object

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

Order object cancelled
Shipping object cancelled

This is the end of the tutorial.

Read more

From the writer

If you enjoyed this article you can find more on our Medium page. For great videos, you can visit our YouTube page.

Are you interested in getting more involved with our community? Join us on our Discord Community Channel.

From the Publisher -

Inspired by this article to bring your ideas to life with Mendix? Sign up for a free account! You’ll get instant access to the Mendix Academy, where you can start building your skills.

For more articles like this one, visit our Medium page. And you can find a wealth of instructional videos on our community YouTube page.

Speaking of our community, join us in our Slack community channel. We’d love to hear your ideas and insights!

--

--

Mendix With Me
Mendix Community

Ricardo Pereira: Certified Mendix Expert from Portugal 🇵🇹 | Founder of Mendix With Me community | Join us on Discord: discord.gg/YHre8dXz3q