This API documentation is for Ballerina 1.2.0. View API documentation for the latest release.

Object - nats : Message

Represents the message, which a NATS server sends to its subscribed services.

Methods

Gets the message content.

Gets the replyTo subject of the message.

Gets the subject to which the message was sent to.

getData

()

returns byte[]

Gets the message content.

  • Return Type

    (byte[])
  • The data returned from the message as a 'byte[]'

getReplyTo

()

returns string?

Gets the replyTo subject of the message.

  • Return Type

    (string?)
  • The subject to which the client is expected to send a reply message

getSubject

()

returns string

Gets the subject to which the message was sent to.

  • Return Type

    (string)
  • The subject that this message was sent to.