generateSerialNumber abstract method

int generateSerialNumber(
  1. String? msgType,
  2. DateTime? now
)

Generates a unique serial number (SN) for message identification.

Creates a cryptographically unique or time-based serial number to uniquely identify a message (used for tracking, deduplication, and receipts).

@param msgType - Optional message type identifier (for type-specific SN generation)

@param now - Optional timestamp (defaults to current time if null)

@return Unique serial number for the message

Implementation

int generateSerialNumber(String? msgType, DateTime? now);