typeproperty that indicates the type of event being performed and optional
payloadthat carries additional information needed to process the event. As in most messaging systems, events are reified, i.e., they are represented as concrete objects and they can be stored and passed around.
metdatathat can be treat as less important from the domain perspective. They can include their unique/correlation identifier which can be used for determining to which input event the output event belongs. Besides that, they can also carry the information about a channel to which the response event should be directed. Both mentioned properties can be used for RPC (Remote Procedure Call) messaging.
errorproperty which can be used to optionally carry the exception information in form of plain object. The last and less important property is used internally by the framework to carry the
rawdata about the incoming event in form of transport layer compatible object.
io-tslibrary we can infer event type from its definition and construct the event object accordingly: