MigratoryDataMessage constructor

MigratoryDataMessage(
  1. String subject,
  2. Uint8List content, {
  3. String closure = "",
  4. QoS qos = QoS.GUARANTEED,
  5. bool retained = true,
  6. String replySubject = "",
  7. bool compression = false,
})

//// Create a MigratoryDataMessage object.

If a reply subject is attached to a message, the message acts as a request message. The clients which receive a request message will be able to reply by sending back one or more messages having as subject the reply subject.

Note: If the reply subject is not already subscribed, it will be subscribed by the library implicitly, and it can be reused for request/reply interactions (and even for receiving multiple replies to one request). When it is not needed anymore, it should be unsubscribed explicitly.

\param subject the subject of the message \param content the content of the message \param closure the closure of the message \param qos the QoS level of the message; the default is QoS.GUARANTEED \param retained indicate whether or not the message should be/was retained by the server; the default is true \param replySubject the reply subject of the message \param compression if true, the content of the message will be published in ZLIB-compressed format; if false no compression format will be used; the default value is false.

Note: If compression is enabled with this method but the size of the content of the message is smaller than the size of compressed content, then the message will be sent uncompressed to save bandwidth and CPU cycles with the decompression on the receiver side.

Implementation

MigratoryDataMessage(this.subject, this.content,
    {this.closure = "",
    this.qos = QoS.GUARANTEED,
    this.retained = true,
    this.replySubject = "",
    this.compression = false});