Clients - rabbitmq : Message

Public Ballerina API - Ballerina RabbitMQ Message.

basicAck

(boolean multiple)

returns Error?

Acknowledge one or several received messages.

Parameters

  • multiple boolean (default false)
  • true to acknowledge all messages up to and including the message called on, false to acknowledge just the message called on.

  • Return Type

    (Error?)
  • An error if an I/O error is encountered or nil if successful.

basicNack

(boolean multiple, boolean requeue)

returns Error?

Reject one or several received messages.

Parameters

  • multiple boolean (default false)
  • true to reject all messages up to and including the message called on; false to reject just the message called on.

  • requeue boolean (default true)
  • true if the rejected message(s) should be requeued rather than discarded/dead-lettered.

  • Return Type

    (Error?)
  • An error if an I/O error is encountered or nil if successful.

getDeliveryTag

()

returns int

Retrieves the delivery tag of the message.

  • Return Type

    (int)
  • int containing the delivery tag of the message.

getProperties

()

returns BasicProperties | Error

Retrieves the properties of the message (i.e., routing headers etc.).

  • Return Type

    (BasicProperties | Error)
  • Properties of the message or error if an error is encountered.

getTextContent

()

returns string | Error

Retrieves the text content of the RabbitMQ message.

  • Return Type

    (string | Error)
  • string containing message data or error if an error is encountered.

getIntContent

()

returns int | Error

Retrieves the int content of the RabbitMQ message.

  • Return Type

    (int | Error)
  • int containing message data or error if an error is encountered.

getFloatContent

()

returns float | Error

Retrieves the float content of the RabbitMQ message.

  • Return Type

    (float | Error)
  • float containing message data or error if an error is encountered.

getJSONContent

()

returns json | Error

Retrieves the json content of the RabbitMQ message.

  • Return Type

    (json | Error)
  • json containing message data or error if an error is encountered.

getXMLContent

()

returns xml | Error

Retrieves the xml content of the RabbitMQ message.

  • Return Type

    (xml | Error)
  • xml containing message data or error if an error is encountered.

getByteArrayContent

()

returns byte

Retrieves the byte array content of the RabbitMQ message.

  • Return Type

    (byte)
  • byte array containing message data or error if an error is encountered.