Universal Messaging C++ - Universal Messaging Event Dictionaries
Constructing an Event
In this code snippet, we assume we want to publish an event containing the definition of a bond, say, with a name of "bond1":
nEventProperties *props = new nEventProperties();
props->put("bondname", "bond1");
props->put("price", 100.00);
nConsumeEvent *evt = new nConsumeEvent(props, "atag");
channel->publish(evt);
Note that in this example code, we also create a new
Universal Messaging Event object (
nConsumeEvent) to make use of our Event Dictionary (
nEventProperties).