During this code lab you'll put your PubSub+ knowledge into action, seeing a day in the life of a developer, and later on a deployment manager.
Prior to the start of the workshop you should have received an email with an invitation to join special Event Portal account used for this workshop. Note that this is different than the main account used by your company.
When you click on Accept Invite, you'll be taken to a page to provide information and create a password. Once you've done that, click on Sign Up.
Once you enter Event Portal, the turn on Event Portal 2.0 features using the toggle switch.
Since you want to change the existing checkInEngine application, use the catalog to find it, and examine what it looks like right now.
Here you see all of the information related to the checkInEngine. Note that:
Now you will find an interesting, existing event and add it to checkInEngine, to make it even more useful. It would be helpful to have the lastest boarding status for flights, so try to find an event related to boarding.
Similar to the application page, the event page shows relevant information for the boardingStatus event.
So you know you've found hidden event gold. Now it's time to update your existing application to use it!
Now you know a great event to add functionality to the checkIn application. Navigate back to the checkin application definition and get started.
As mentioned earlier, once an application is put into released status, it can no longer be updated. To create a new version
Now you have a new version of the checkInEngine application in Draft status, which can be edited.
Since you want to add an existing event, click on Manage Events, which lets you modified subscribed and published events.
You will see a list of events in the checkin domain. (If you wanted to use a shared event outside the active domain you could use the Application Domain drop down at the top of the popup). To subscribe to the boardingStatus event:
Make sure your changes are saved by clicking on Save Version
Now the application is expecting the boardingStatus event, but you also need to specify where on the event broker to get the event. A consumer lets you do that.
checkinEngine.boardingStatus
Solace Direct Client
from the Type pull downIn the next screen, Event Portal suggests events you might want to consume. Click on the Select button next to boardingStatus
Since you want to release the updated spec to your dev team, change the state of the version by first clicking on Change State
While you're at it, deprecate the old version so people know it's going away soon.
Now you've got a new application definition that is much more functional. But what can you do with it? In the next section, you will put your new application version into action.
So you've got the structure of the new checkInEngine application. Now it's time to take it from design to implementation. The key is AsyncAPI, which gives you access to a wide variety of tooling–including code generation.
Picking up where you left off in the last section:
In the resulting Download AsyncAPI window,
Save the AsyncAPI file on your desktop and open it in the text editor of your choice.
There is wide support for AsyncAPI in many different tools, but the easiest way to get started is with AsyncAPI Studio
Now would be a good time to check out structure of an AsyncAPI document. You'll see that:
To actually generate the code,
On the next popup,
The code generated by the AsyncAPI tooling has a deep folder structure, with the source AsyncAPI at the top level. To see the generated code:
/template/src/main/java
Application.java
This contains the application logic, which would be filled in by developers with your specific business logic.Example of generated POJOs.
So now you have defined an interface, specified where on the broker you will send and receive events, and generated code that implements it all. But how do you keep everything in order while moving environments? That's coming soon, but first some behind the scenes work.
To this point you've played the role of a developer. And your access in Event Portal has reflected that. You've only been able to see domains that you have authorization to, not those of other students. In the same way, developers in a real-organization wouldn't be able to see or at least change events and applications owned by another group.
In this section, you'll support the infrastructure. But to do that, you will need a different role in Event Portal.
If you're an admin, you can see all users for an account by
On the resulting admin screen,
You will see a variety of different roles for the user. For this scenario though, make them a Event Portal manager.
Now you are all set for the next section, where you will play the part of a deployment manager.
With your new job role of deployment manager in place, there is of course an immediate crisis. Luckily you have the tools to quickly analyze what's going on.
The first thing you'll notice is that as a deployment manager you have a new tool availabe to you: the Runtime Event Manager. You can get to it two ways:
Open the Runtime Event Manager using the sidebar
Once you open the runtime event manager, you'll see
Your new access also lets you see additional resources within Event Portal, including others students' domains. So for the rest of the lab, please be careful not to touch other peoples' stuff.
A co-worker runs into the room, panicked because boardingStatus events are piling up on the event broker in Integration. And there is a big presentation in 5 minutes.
Not wasting any time, you open up your integration modelled event mesh.
One thing is immediately obvious: the boarding status event isn't being consumed as expected in the Integration environment. But why?
Then you spot it: the wrong version of checkInEngine is deployed!
You get on the phone immediately to the deployment team, and they promote the new version of checkInEngine to integration. Crisis resolved!
In the meantime you get started on updating the modelled event mesh to match the new deployment.
Under Environments for the version
Now switch to the version of the application that you created and add it to Integration by
Now you can assign the application to a particular environment, modelled event mesh and a messaging service, which is one event broker within an event mesh.
Navigate back to your integration modelled event mesh. You should now see a beatifully connected graph, with boardingStatus flowing into checkInEngine.
So, you've saved the day with Event Portal. But having to manually update the modelled event mesh to reflect reality probably isn't the best process. A better way would be to have Event Portal updates be part of your CICD pipeline. If you're in a classroom setting, you're in luck, because that's the next topic. If you are working independently, check out this summary blog on Solace.com
Thanks for participating in this codelab! Let us know what you thought in the Solace Community Forum! If you found any issues along the way we'd appreciate it if you'd raise them by clicking the Report a mistake button at the bottom left of this codelab.