Universal Messaging Developer Guide : The Enterprise Client APIs : Overview of Enterprise Developer's Guide for Python : Enterprise Client Development : Universal Messaging Python : Writing an Event to a Universal Messaging DataGroup
Universal Messaging Python : Writing an Event to a Universal Messaging DataGroup
Once the Universal MessagingSession has been established with the Universal Messaging realm server, a new Universal Messaging Event object (nConsumeEvent) must be constructed.
Note that in this example code, we also create a Universal Messaging Event Dictionary object (nEventDictionary) for our Universal Messaging Event before publishing it:

datagroupname = "myDataGroup"
props = nEventProperties()
props.put("exampleKey", "Hello World")
event = nConsumeEvent(props,"aTag")

mySession.writeDataGroup(datagroupname,event)
Note that there is no Universal Messaging DataGroup object, you simply pass the name of the DataGroup you wish to publish to.
The underlying library (written using the Universal Messaging C++ API) will create the DataGroup if it does not exist on the Universal Messaging Realm Server.
Copyright © 2013-2014 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback