Applications
An application represents a program, process, microservice, IoT device, integration component, or other runnable consumer, producer, or processor of events that interacts with an event broker.
This section includes the following tasks:
- Creating an Application
- Updating an Application
- Changing the State of an Application Version
- Adding an Application to an Environment
- Downloading an AsyncAPI Document for an Application
You can also create custom attributes for applications. For more information, see Using Custom Attributes
Creating an Application
You can create an application in any application domain where you have sufficient access based on your role. When you create an application, you specify several settings:
- name
- broker type
- version display name, number, and state for each version
- event flows
When you model event flows for an application you can use the following options:
-
Specify events that the application intends to subscribe to.
This option is most useful early in the design process when you may not be ready to specify topic addresses or consumer details but you want to specify the intent of an application to consume a particular event. Identifying the intent is optional but can be helpful in these ways:
- It flags the event in the modeled event mesh if no application publishes it.
- It flags the application in the modeled event mesh to remind you that you still need to configure a consumer to attract the event.
- It enables Event Portal to provide suggestions to help you create the consumer and topic subscription when you are ready to do so.
-
Specify consumers, such as event queues, direct clients, and Kafka consumer groups, that the application gets event messages from.
This option allows you to create a modeled event mesh that closely matches your operational event brokers in the runtime. You must specify consumers to be able to audit a modeled event mesh containing the application against the runtime data. You can specify three types of consumers:
- Event Queue—an endpoint on a Solace event broker that attracts messages with topic subscriptions and stores messages while the consumer is offline or reconnecting
- Direct Client—a direct connection to a Solace event broker that attracts messages with topic subscriptions but does not store messages while the consumer is offline or reconnecting
- Consumer—a consumer group in a Kafka cluster that subscribes to topics
- Specify events that the application publishes to be consumed by other applications.
To create an application, perform these steps:
- On the Application Domains page, select the application domain where you want to create the application and click Open Application Domain.
-
Select the Applications tab and click Create Application.
- Enter a Name for the application.
- Select the Broker Type for the application.
- In the Version field, specify a semantic version value for the application in the format major.minor.patch. The default is 0.1.0.
- (Optional) Enter a Version Name for the initial version of the application.
- (Optional) Enter a Description for the application. The Description field supports Markdown. Click toggle preview
to preview the rendered text.
- To select events that the application publishes or intends to subscribe to, perform these steps:
- In the Event Flows section, select Events.
- Click Manage Events.
- In the Application Domain list, select the application domain for an event that you want the application to publish or subscribe to. By default, the list shows events from the current application domain. If you select a different application domain or remove the filter, the list also shows shared events in selected application domain or in all application domains that you have access to.
- Expand an event to see the list of event versions.
Select Sub for a version of each event that you want the application to subscribe to.
You don't need to specify both a subscription and a consumer for an event in the same application version. If you have the consumer and topic subscription details to specify a consumer, you don't also need to specify the intent to subscribe to the event.
- Select Pub for a version of each event that you want the application to publish.
- When you are finished selecting events, click Close
.
- To specify a consumer that the application receives events from, perform these steps:
- In the Event Flows section, select Consumers.
- Click Add Consumer.
- Type a Name for the consumer.
- Select a consumer type. The options available depend on the selected Broker Type.
- To add a topic subscription to the consumer, click Add Subscription. You can add more than one subscription to a consumer.
- Enter a topic subscription for the consumer to subscribe to. You can use
*
and>
as wildcard characters to subscribe to a group of related addresses. For more information, see Topic Subscriptions. When you enter a topic subscription, a Preview of Attracted Events shows all event versions with a matching topic address that are published by an application version that has been added to at least one modeled event mesh. - Repeat steps b to f for every consumer that you want to add.
- (Optional) Add values for any custom attributes that have been set up in your organization.
- Click Save Application.
Updating an Application
When you update an application, you can update an existing version or create a new version of the application. Versions allow you to work on updates and test new versions in development and staging environments while the stable version remains in the production environment. Each version also has a lifecycle state. You can only edit versions that are in Draft state. For more information, see Object Versions and Lifecycle States.
The version number uses semantic versioning in the format major.minor.patch. When you update an object, you have three options:
- If the object version is in Draft state, you can update an existing version and retain the version number
- If the object version is in Released, Deprecated, or Retired state, you can duplicate a version and increment the version number to create a new Draft version.
- If the object version is in Released, Deprecated, or Retired state, you can create a new version of the object from scratch
If you want to update a version that is not in Draft state it is best practice to create a new version rather than returning the version to Draft state.
When you reference an object, for example, you specify the schema that an event uses or an event that an application publishes, you select the version of the object that you want to reference. If a new version of a referenced object is created, you can choose when to update references to the new version.
To update an application, perform these steps:
- On the Application Domains page, select the application domain that contains the application you want to update and click Open Application Domain.
- Select the Applications tab.
- In the list of applications, click More Actions
for the application that you want to update and select Open Application.
- Perform one of the following actions:
- In the Versions list, click More Actions
for the version that you want to update and select Edit. Any changes you make update that version of the application. You can edit an application version only if it is in Draft state.
- In the Versions list, click More Actions
for the version that you want to update and select Duplicate. All properties of the existing version are copied into a new version. By default, the new version number is incremented by 0.0.1. You can change the version number to any number not already in use.
- Above the Versions list, click Add
to create a new version of the application without duplicating an existing version. By default, the new version number is the next unused major version. You can change the version number to any number not already in use.
- Update the application version as necessary.
- Click Save Version or Save & Close.
Changing the State of an Application Version
When you create a new version of an application, the version is in Draft state. When the version is ready, you can change the version state to Released. When you release a new version of an application, you may also want to change older versions of the application to Deprecated or Retired. You must have an Event Portal Manager or Administrator role to change the version state. For more information about version states, see Object Versions and Lifecycle States
You can only change an application version from Draft to Released state after all event versions that the application references have been changed out of Draft state.
To change the state of an application version, perform these steps:
- On the Application Domains page, select the application domain that contains the application you want to update and click Open Application Domain.
- Select the Applications tab.
- In the list of applications, click More Actions
for the application that you want to update and select Open Application.
- Select the version that you want to change the state of then click Change State.
- Select the new state and click Change State.
Adding an Application to an Environment
When a version of an application is ready to include in a modeled event mesh, you add the application version to an environment from Designer. When you add an application version to an environment, you choose the environment and modeled event mesh and then select one or more event brokers in the modeled event mesh to associate the application version with.
After you add an application version to a modeled event mesh, you can view the application and its associated events in Runtime Event Manager. You can add the same application version to more than one environment or add different versions of an application to different environments. For example, you may have a production version of an application in a modeled event mesh in one environment and an updated draft version ready for testing in two modeled event meshes in another environment.
Before you add an application to an environment, the environment must have at lease one modeled event mesh of the same type as the application and you must have added at least one event broker to the modeled event mesh.
To add an application version to an environment:
- On the Application Domains page, select the application domain that contains the application and click Open Application Domain.
- Select the Applications tab.
- Select the application.
- In the Versions list, select the version that you want to add to an environment
- In the Application Details pane, click More Actions
, then select Add to Environment.
- Select the Environment that contains the modeled event mesh that you want to add the application version to.
- Select a modeled event mesh from the Modeled Event Mesh list.
- Select one or more Event Brokers to associate the application with.
- Click Add.
After you add the application version, you can view it in the modeled event mesh in Runtime Event Manager.
Downloading an AsyncAPI Document for an Application
An AsyncAPI document is a JSON or YAML file generated according to the AsyncAPI Specification. For more information, see the AsyncAPI Initiative. You can give the AsyncAPI document to developers to help them create the actual applications that are part of your event mesh.
You can download an AsyncAPI document for an application with or without server details and operation bindings for any model event brokers that the application is associated with in an environment.
To download a basic AsyncAPI document for an application, perform these steps:
- On the Application Domains page, click the name of the application domain that contains the application.
- Select the Applications tab.
- In the list of applications, click the name of the application.
- In the Versions list, select the version that you want to download the AsyncAPI document for.
- In the version details, click More Actions
and select Download Async API.
- If you want to include server details and operation bindings for an event broker that you have associated the application with, select the event broker from the Event Broker drop-down list.
- Select JSON or YAML file format.
- Click Download File.