PURISTA API / @purista/core / fromCloudEvent
Function: fromCloudEvent()
fromCloudEvent<
Payload>(cloudEvent,options):object
Defined in: helper/enterpriseInterop.ts:456
Convert a CloudEvents 1.0 object into a PURISTA custom event message.
Strict mode requires PURISTA sender extension metadata. Compat mode accepts external CloudEvents and derives explicit external sender defaults.
Type Parameters
Payload
Payload = unknown
Parameters
cloudEvent
JsonRecord | CloudEvent
options
Returns
contentEncoding
contentEncoding:
string
content encoding of message payload
contentType
contentType:
string
content type of message payload
correlationId?
optionalcorrelationId?:string
correlation id to know which command response referrs to which command
eventName
eventName:
string
event name for this message
id
id:
string
global unique id of message
messageType
messageType:
CustomMessage
Message type musst be EBMessageType.CustomMessage
otp?
optionalotp?:string
stringified Opentelemetry parent trace id
payload?
optionalpayload?:Payload
the message payload
principalId?
optionalprincipalId?:string
principal id
receiver?
optionalreceiver?:EBMessageAddress
an optional receiver
sender
sender:
object
sender.instanceId
instanceId:
string
instance id of eventbridge
sender.serviceName
serviceName:
string
the name of the service
sender.serviceTarget
serviceTarget:
string
the name of the command or subscription
sender.serviceVersion
serviceVersion:
string
the version of the service
tenantId?
optionaltenantId?:string
principal id
timestamp
timestamp:
number
timestamp of message creation time
traceId?
optionaltraceId?:string
trace id of message
