When you don’t want the hassle of maintaining Axon Server yourself or if you just want to quickly test your newly developed application, you can simply use Axon 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. 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 Axon 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 that are 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 start connecting an application. To achieve this you need to use application bindings to connect your Axon application to a particular context in Axon Cloud.

How to connect an application

In this example we will set-up the “Hotel Demo” application to connect with Axon Cloud. The application can be found here: https://github.com/AxonIQ/hotel-demo 

Firstly, we use the drop-down menu to add a new space for our Hotel company.

After we created 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. 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 Axon 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. 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 safely connect with Axon Cloud.

After closing the application-token pop-up, the application binding dashboard should look like this:

The next step is to actually 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 Axon 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.

Observability

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:

Space management

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 the Space Management by clicking the plus button. This link can be shared with a coworker or deactivated by clicking the disable button. 

Subscribe to blog notifications