Universal Messaging 9.8 | Universal Messaging Developer Guide | Enterprise APIs | Enterprise Developer's Guide for C++ | Publish / Subscribe using Datastreams and Datagroups | DataGroups Event Publishing
 
DataGroups Event Publishing
You can get references to any DataGroup from the nSession object. There are various writeDataGroup methods available. These methods also support batching of multiple events to a single group or batching of writes to multiple DataGroups.

myDataGroup* = mySession->getDataGroup("myGroup");
nEventProperties* props = new nEventProperties();

//You can add other types in a dictionary object
props->put("key0string"+x, "1"+x);
props->put("key1int", (int) 1);
props->put("key2long", (long) -11);

nConsumeEvent* evt1 = new nConsumeEvent(props, buffer);

//Publish the event
mySession->writeDataGroup(evt1, myDataGroup);

Copyright © 2013-2015 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.