WaitingMessage constructor

WaitingMessage(
  1. String channel,
  2. String event,
  3. Map<String, dynamic> payload
)

Creates a new waiting message with the specified pub/sub system, event, and payload.

Automatically assigns a unique ID and timestamp to the message and increments the global waiting message counter.

Parameters:

  • pubSub: The pub/sub system instance handling this message
  • event: The event type/name for this message
  • payload: The initial payload data for the message

Implementation

WaitingMessage(this.channel, this.event, this.payload) {
  timestamp = DateTime.timestamp().millisecondsSinceEpoch;
  id = _id;
  _id++;
  _waitingMessageCount++;
}