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

Clients - nats : StreamingMessage

Represents the message a NATS Streaming Server sends to its subscribed services.

Remote Methods

ack

Acknowledges the NATS streaming server upon the receipt of the message.

Methods

Gets the message content.

Gets the subject that the message was sent to.

ack

()

returns Error?

Acknowledges the NATS streaming server upon the receipt of the message.

  • Return Type

    (Error?)
  • () or else a nats:Error upon failure to acknowledge the server

getData

()

returns byte[]

Gets the message content.

  • Return Type

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

getSubject

()

returns string

Gets the subject that the message was sent to.

  • Return Type

    (string)
  • The subject, to which the message was sent