Calling an Asynchronous Queue from Mendix

Last modified by Eva Torken on 2024/02/22 13:15

With the help of the eMagiz Mendix module created by the eMagiz team, you can easily connect between Mendix and eMagiz for data integration. In this microlearning, we will focus on calling an asynchronous queuee from Mendix.

Should you have any questions, please get in touch with academy@emagiz.com.

1. Prerequisites

  • Intermediate knowledge of the eMagiz platform
  • Access to a Mendix application
  • Access to the Deploy phase of your eMagiz project
  • A connection between Mendix and eMagiz Designed and Created
  • Using eMagiz Mendix version 5.0.0 or higher.

2. Key concepts

This microlearning centers around calling an asynchronous queue from Mendix
With eMagiz Mendix Connector, we mean: A Mendix module developed and maintained by eMagiz that simplifies connect a Mendix application to an eMagiz project for data traffic between both systems.

To call an asynchronous queue from Mendix, you need the following:

  • Export object (including mapping) or string to export
  • Name of the queue on which you want to publish the data

3. Calling an asynchronous queue from Mendix

With the help of the eMagiz Mendix module created by the eMagiz team, you can easily connect between Mendix and eMagiz for data integration. In this microlearning, we will focus on calling an asynchronous queue from Mendix. For sending data to eMagiz, we offer two options to send data to our messaging engine:

  • Using the export mapping to send data to the queue
  • Sending a string message directly to the queue

Alternatively, you could use the eMagiz Kafka connector to connect to the event broker that eMagiz offers. For more information on that, please check out this [microlearning](intermediate-event-streaming-connectors-using-Kafka-module-mendix.md).

Below, we will detail how to configure each option for sending data asynchronously to the messaging engine.

3.1 Sending asynchronous messages via Send Message Java Action

Below is the example of the Send Message microflow that contains this Java Action.

intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-send-message-java.png

  1. Mapping parameter * select the Mendix entity that holds the data to be sent to eMagiz for further processing
    2. Export mapping * ensure to have created a Mendix Export mapping object so that the data can be appropriately processed by eMagiz. Consider sequence, data types, and other aspects of attributes to ensure the message can be adequately processed
    3. Validate * select if the message needs to be validated in Mendix
    4. Queue * enter the proper value for the onramp queue of eMagiz where the message needs to be put on. Below is an example of an onramp queue / select the destination name as the queue name.

intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-queue-determination.png

3.2 Sending asynchronous messages via Send String Java Action

Below is the example of the Send Message microflow that contains this Java Action.

intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-send-string-java.png

  1. Message * a string representation of a message that you want to place on the queue
    2. Queue * enter the proper value for the onramp queue of eMagiz where the message needs to be put on. Below is an example of an onramp queue / select the destination name as the queue name.

intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-queue-determination.png

4. Key takeaways

To call an asynchronous queue from Mendix you need the following:

  • Export object (including mapping) or string to export
  • Name of the queue on which you want to publish the data
  • Depending on your needs, there is a separate Java action available

Note: To make a connection in allowing data to travel between A and B, you need to fill in the correct constants and set up your Keystore and Truststore correctly. For more information check out this course.

5. Suggested Additional Readings

If you are interested in this topic and want more information, please read the release notes provided by eMagiz that accompany the eMagiz Mendix Connector version you have selected.