Issue
After setting up SAP Event Mesh and installing the SAP Event Mesh Connector from the Mendix Marketplace, a queue subscription was successfully created from the Mendix app. However, it was unclear how the messages sent by SAP are actually received and processed in the app. The expectation was that the connector would act as a broker that pushes incoming messages to the application, for example by allowing a microflow to be passed as a parameter, which would then be triggered for each incoming message. The connector does not support this option, and the documentation does not clarify how messages should be handled after subscribing to a queue.
Environment
SAP Event Mesh Connector (all versions)
Cause
The SAP Event Mesh Connector does not provide a push mechanism. Creating a queue subscription only links a topic to a queue in SAP Event Mesh; it does not register a callback or microflow in the Mendix app. Messages remain in the queue until the application actively retrieves them, so a pull-based approach must be implemented in the app.
Solution/Workaround
Messages must be consumed from the queue by the Mendix application itself. Use the activities delivered with the SAP Event Mesh Connector as follows:
Configure the module with the required SAP Event Mesh credentials (management credentials and messaging credentials).
Use the
CreateQueueSubscriptionactivity to create the subscription. This activity requires the management credentials, the topic or topics to be created, and the queue or queues subscribed to the topic. This only creates the binding between topic and queue in SAP Event Mesh.Use the
ConsumeMessageactivity to retrieve a message from the queue. This activity requires the credentials and the queue name as parameters.Handle the returned
ConsumeResponseobject, which contains the message ID and the message content. This is a non-persistable entity, so if the message needs to be kept for a longer period, either store the content in another entity or change the entity to persistable.To keep receiving new messages, call the microflow containing the
ConsumeMessageactivity repeatedly, for example by using a scheduled event that runs at a regular interval. Add the required processing logic (parsing, mapping, and storing the message content) after the consume activity.
Internal information related
- 287720
- C0161C11YH1/p1789114589029639
Additional information
- Mendix documentation: SAP Event Mesh Connector
0 Comments