Apama 10.15.0 | Connecting Apama Applications to External Components | Correlator-Integrated Support for the Java Message Service (JMS) | Using the Java Message Service (JMS) | Getting started with simple correlator-integrated messaging for JMS | Configuring sender event mappings
 
Configuring sender event mappings
Each event mapping for a JMS message to be sent is configured by specifying the source Apama event type, and a set of mapping rules that populate the target JMS message from the fields of the source Apama event.
*To configure an event mapping
1. Ensure that the Apama event types you wish to use for mapping have been defined in an EPL file in your project.
2. If necessary, in the Project Explorer, double-click the project's correlator-integrated adapter for JMS instance. This opens the instance configuration in Apama's adapter editor.
3. Select the JMS connection.
4. In the correlator-integrated adapter for JMS editor, select the Event Mappings tab.
5. On the adapter editor's Event Mappings tab, select the Sender Mapping Configuration tab.
6. On the Sender Mapping Configuration tab, click the Add Event button (Plus icon) to display the Event Type Selection dialog.
7. In the Event Type Selection dialog's Event Type Selection field, enter the name of the event. As you type, event types that match what you enter are shown in the Matching items list.
8. In the Matching items list, select the name of the event type you want to associate with the JMS message. The name of the EPL file that defines the selected event is displayed in the status area at the bottom of the dialog.
9. Click OK.
This updates the display in the adapter editor's Event Mappings tab to show a hierarchical view of the Apama event on the left (the mapping source) and a hierarchical view of the JMS message on the right (the mapping target).
10. Create a mapping rule as follows:
a. If necessary, click on the event to be mapped in the Event Name column.
b. Click on the entity in the event tree and drag a line to the entity in the message tree.
For example, a simple mapping would be from a single string field in an Apama event to JMS Body in the JMS message. More complex mappings might involve mapping an event field to a specific JMS property. For more information see Mapping Apama events and JMS messages.
11. Specify the message's JMS destination in either of two ways:
*Specify a constant value in the event type's mapping:
Constant value
For more information on specifying a constant value, see Using expressions in mapping rules.
*Specify a destination in an event field and map that field to the message:
Destination
Note destination is always specified as topic:name, queue:name, or jndi:name.