Delegate Delegates.CustomProtocolDataPayloadHandler
- Namespace
- SmarterLink.Core.Messaging
- Assembly
- SmarterLink.Core.dll
Handler for a custom (application-defined) SmarterLink payload.
Custom payloads use the standard protocol envelope but carry an arbitrary JSON payload
and a caller-defined payloadType name, for use cases that do not fit the standard
typed event model. Publishers should follow standard SmarterLink topic conventions where possible.
public delegate Task Delegates.CustomProtocolDataPayloadHandler(string topic, ProtocolDataHeader header, string customPayload)
Parameters
topicstringThe MQTT topic on which the message arrived.
headerProtocolDataHeaderThe standard protocol header, including
PayloadTypeandUserData.customPayloadstringThe raw JSON payload string.
Returns
- Task
- Handler for a custom (application-defined) SmarterLink payload. Custom payloads use the standard protocol envelope but carry an arbitrary JSON payload and a caller-defined payloadType name, for use cases that do not fit the standard typed event model. Publishers should follow standard SmarterLink topic conventions where possible.