When you don’t want the hassle of maintaining Axon Server yourself or just want to test your newly developed application quickly, you can use AxonIQ Cloud Console instead.
For starters, you should create an account on https://console.cloud.axoniq.io and authorize yourself by using your Google or Github accounts. After that, you can create an account by adding your personal details and agreeing to the terms and conditions. Finally, when clicking the continue button, you will be redirected to your Dashboard.
Here you can start creating a Space (a workspace) that allows you to share your context setup with your co-workers; but, you can also keep it private, of course. A Context in the AxonIQ Cloud Console can be regarded as the bounded context notion in Domain-Driven Design, and it reflects the multi-context support in AxonServer. It means that applications bounded to this context don't leak any information to the outside world (other than (the desired) milestone events, for example).
After having authorized, created a space, and defined a context, you can connect an application. To achieve this, you need to use application bindings to connect your Axon application to a particular context in AxonIQ Cloud.
Firstly, we use the drop-down menu to add a new space for our Hotel company.
After creating the hotel demo space, we can add the booking context for the application to connect with. When you create a context, you’ll be asked to enter the type. This type represents the availability characteristics of your context. So, after we created a context, the context dashboard should look as follows:
Now that we have defined the context, we can connect our application to it. To do this, we need to create an application binding, which will bind the Hotel Gift Card Management application to the context we have just built in AxonIQ Cloud through means of a token.
Let us create an application binding with the name hotel-demo, which provides us with the application token, like so:
When connecting your application for the first time, you would need to copy the entire configuration to your application.properties file. Then, for future instances of connecting your application, you would only need to update the token in your application.properties file. Doing so will allow the application to connect with AxonIQ Cloud safely.
After closing the application-token pop-up, the application binding dashboard should look like this:
The next step is actually to connect the Booking application by simply running it. After the application has started, it should appear in the dashboard:
This means that the Hotel Gift Card Management application is connected to AxonIQ Cloud. This application has one event processor, can handle eight different commands, and respond to nine distinct queries. For more detailed application information, you can click on the application tile.
Because AxonServer is abstracted away, you can search and inspect events in the event store menu:
Furthermore, you can get more information about metrics of your contexts in the Statistics menu:
When you create a Space, you are the owner, and you see a Space Management menu. In the Members section, you can delete members. You can also transfer the ownership of the entire space to another member.
In the Invites section, the owner can share the Space with others that work on the same project by inviting them. He can generate a link in the Invite tab of Space Management by clicking the plus button. This link can be shared with a coworker or deactivated by clicking the disable button.
A backend developer with more than 2 decades of experience and passionate about Java and the Spring Framework. Since 2017 my main focus is helping customers of AxonIQ to use and implement the Axon Framework as a consultant. I like to solve complex puzzles as easy as possible.