Universal Messaging 10.11 | Developer Guide | Enterprise APIs | Enterprise Developer's Guide for C# | Publish / Subscribe using Channel Topics | Consuming a JMS Map Message
 
Consuming a JMS Map Message
In order to enable Universal Messaging to support JMS, message types for JMS are stored in a slightly different way from the normal nConsumeEvent.
When a Java client publishes a JMS Map Message, the map is serialised and stored in the payload of the message. For a C# subscriber to consume a JMS Map Message, this payload must be reconstructed as an nEventProperties using the getPayloadAsDictionary method.
Consuming a Map Message
A JMS map message will be received in the go callback in the same way as a normal nConsumeEvent. Once received, the Map Message can be handled as follows:

go(nConsumeEvent evt){
if(evt.getAttributes().getType()==nEventAttributes.MapMessageType){
nEventProperties map = evt.getPayloadAsDictionary();
}
}