Apama 10.7.2 | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The Universal Messaging Transport Connectivity Plug-in | Using Universal Messaging connectivity from EPL
 
Using Universal Messaging connectivity from EPL
In EPL, in order to receive events from a Universal Messaging channel, you just need to subscribe to a channel with the appropriate prefix:
on all EventTypeOnUM() { ... }
monitor.subscribe("um:UMChannelName");
This creates a chain with a channel pattern matching um:UMChannelName and subscribe to UMChannelName on the connected realm. Events from that channel are delivered to the context after being parsed by the chain.
To send to a Universal Messaging channel, you just need to use the send...to statement to deliver an event to that channel name:
send EventTypeOnUM() to "um:UMChannelName";
This will use the same chain definition as above to deliver the mapped event to the Universal Messaging channel UMChannelName.
The samples/connectivity_plugin/application/genericsendreceive directory of your Apama installation includes a simple sample which provides an easy way to get started with sending and receiving messages to or from any connectivity plug-in. For more information, see the README.txt file in the above directory and Sending and receiving events with connectivity plug-ins.