SAP Event Mesh Connector

Last modified: April 18, 2024

1 Introduction

The SAP Event Mesh connector connector enables you to connect your app to SAP Event Mesh and connect your Mendix app to applications, services, and systems across hybrid environments.

1.1 Typical Use Cases

You can use the connector to perform the following tasks:

  • Management of queues and queue subscriptions
  • Publishing of messages to a queue or topic, consumption of message from queue
  • Publishing a cloud event

1.2 Prerequisites

The following roles are required for the user to be able to configure the SAP Enterprise Messaging service. You must assign the roles to the user in the SAP BTP subaccount for which the SAP Enterprise Messaging service is being provisioned.

  • Enterprise Messaging Developer - developer role
  • Enterprise Messaging Display - read-only role
  • Enterprise Messaging Administrator - administrator role

1.3 Licensing and Cost

This connector is available as a free download from the Mendix Marketplace, but the SAP service to which is connects may incur a usage cost. For more information, refer to SAP documentation.

Depending on your use case, your deployment environment, and the type of app that you want to build, you may also need a license for your Mendix app. For more information, refer to Licensing Apps.

2 Installation

Follow the instructions in Using Marketplace Content to import the SAP Event Mesh connector into your app.

3 Configuration

After you install the connector, you can find it in the App Explorer, in the SAPEventMeshConnector section. The connector provides a domain model and several actions that you can use to connect your app to the SAP Event Mesh service. Each action can be implemented by using it in a microflow.

The SAP Enterprise Messaging service (Event Mesh) instance must be created with the desired configuration and the service instance must be bound to the app.

3.1 Configuring the Enterprise Messaging Service

The Event Mesh Configurator provides a user friendly interface to create the JSON required to configure the required Enterprise Messaging service instance with the desired configuration. To bind and configure the service, perform the following steps:

  1. Ensure that the enterprise-messaging service is in the status Available Services in Developer Portal. See the Services Tab section of SAP Business Technology Platform for more information.

  2. Click Available Services > ⚙️ Configurator to open the configurator.

  3. Provide the required information. For more information about the parameter syntax, see Syntax for Service Descriptor.

    • EM Name - Enter a display name for the service.
    • Namespace - The namespace is a prefix that ensures that every message client within a subaccount is unique. It must consists of 3 segments and contain no more than 24 characters. As a best practice, use the format orgName/clientName/uniqueId.
    • Options - Select Messaging.
    • Rules - This section defines the publish or consume privileges for a message client. In order to allow access to a queue or topic, you must include the namespace of the corresponding owner message client. Instead of a defined namespace, you can use the placeholder $(namespace).
  4. Click Upload Configuration To Service to upload the configuration automatically. The configuration will be applied when your app is restarted.

    Alternatively, click Download Configuration File to save the file locally so that you can review it, or reuse it. You can upload it manually to the Enterprise Messaging service by clicking Browse… next to the Configurator JSON option, and then choosing the file that you downloaded.

4 Technical Reference

To help you work with the SAP Event Mesh connector, the following sections of this document list the available entities, enumerations, and activities that you can use in your application.

4.1 Domain Model

The domain model is a data model that describes the information in your application domain in an abstract way. For more information, see Domain Model.

The entities in the table below describe all generalizations. These are reused by the different models for the specific microflow activities or for storing connection details.

Name Description
Credentials Credential details
Response Messaging API response
Error Error reported by the messaging API response
ConsumeResponse Response to the ConsumeMessage action
PublishResponse Response to the PublishMessage action
Queue Queue details response
QueueSubscriptions Queue subscription response

4.2 Enumerations

An enumeration is a predefined list of values that can be used as an attribute type. For the SAP Event Mesh connector, enumerations list values such as the type of credentials required for the available actions.

4.2.1 Enum_CredentialType

Name Caption Description
management Management Credentials required for queue management tasks
messaging Messaging Credentials required for messaging tasks

4.2.2 Enum_DestinationType

Name Caption
queue Queue
topic Topic

4.2.2 Enum_AccessType

Name Caption
NON_EXCLUSIVE NON_EXCLUSIVE
EXCLUSIVE EXCLUSIVE

4.3 Actions

The SAP Event Mesh connector allows your Mendix app to manage queues and queue subscriptions by using microflows and microflow activities.

4.3.1 Publish Message to Queue or Topic

The PublishMessage activity allows you to publish messages to queues or topics. It requires the following parameters:

  • Credentials
  • Destination
  • Queue or Topic Name
  • Message
  • Message Or Content Type
4.3.1.1 Sample Microflow

4.3.2 Consume Message from a Queue

The ConsumeMessage activity allows you to consume a message from a queue. It requires the following parameters:

  • Credentials
  • Queue Name
4.3.2.1 Sample Microflow

4.3.3 Publish Event

The PublishCloudEvent activity allows you to publish events that are compliant with the Cloud Events specification. It requires the following parameters:

  • Credentials
  • EventId
  • EventSource
  • EventType
  • MessageData
4.3.3.1 Sample Microflow

4.3.4 Get All Queues

The GetQueueList microflow allows you to retrieve a list of queues. It requires the Management Credentials parameter.

4.3.4.1 Sample Microflow

4.3.5 Get Queue Details

The GetQueueDetails microflow allows you to retrieve detailed information about a queue. It requires the Management Credentials and Queue Name as parameters.

4.3.5.1 Sample Microflow

4.3.6 Get Queue Subscriptions

The GetQueueSubscriptions microflow allows you to retrieve information about subscriptions to a queue. It requires the Management Credentials and Queue Name as parameters.

4.3.6.1 Sample Microflow

4.3.7 Create or Update Queue

The CreateOrUpdateQueue activity allows you to create a new queue or update an existing queue. It requires the Management Credentials and Queue Name as parameters.

4.3.7.1 Sample Microflow

4.3.8 Delete Queue

The DeleteQueue activity allows you to delete a queue. It requires the Management Credentials and Queue Name as parameters.

4.3.8.1 Sample Microflow

4.3.9 Create Queue Subscription

The CreateQueueSubscription activity allows you to create a new subscription to a queue. It requires the following parameters:

  • Management credentials
  • Topic or topics to be created
  • Queue or queues subscribed to the topic
4.3.9.1 Sample Microflow

4.3.10 Delete Queue Subscription

The DeleteQueueSubscription activity allows you to delete a subscription to a queue. It requires the following parameters:

  • Management credentials
  • Topic to be deleted
  • Queue or queues subscribed to the topic that you want to delete
4.3.10.1 Sample Microflow