sendAsObject method

  1. @override
Future sendAsObject(
  1. String? correlationId,
  2. String messageType,
  3. dynamic message

Sends an object into the queue. Before sending the object is converted into JSON string and wrapped in a MessageEnvelope.

  • correlationId (optional) transaction id to trace execution through call chain.
  • messageType a message type
  • value an object value to be sent Return (optional) Future that receives null for success. Throws error

See send


Future sendAsObject(String? correlationId, String messageType, message) {
  var envelope = MessageEnvelope(correlationId, messageType, message);
  return send(correlationId, envelope);