A (Pulsar) message received from a device or sent to a device

interface DeviceMessage {
    clientID?: string;
    payload: Uint8Array;
    time?: Date;
    topic: string;
    transportFields?: { [key: string]: any };
    transportID: string;
}

Properties

clientID?: string

Transport client the message was received from or will be delivered to. Don't set for broadcast.

payload: Uint8Array

Always gets a byte array

time?: Date

Timestamp of incoming Pulsar message (does not need to be set when sending)

topic: string

The topic on the transport (e.g. MQTT topic, or equivalent concept such as path for other transports).

transportFields?: { [key: string]: any }

Optional dictionary of transport (e.g. MQTT-specific) fields/properties/headers. Values are strings.

transportID: string

Mandatory identifier for the source/dest transport e.g. "mqtt", "opc-ua" etc.