Clients - artemis : Message

Represents ActiveMQ Artemis Message.

acknowledge

()

returns error?

Acknowledges reception of this message.

  • Return Type

    (error?)
  • If an error occurred while acknowledging the message

getBodySize

()

returns int

Returns the size (in bytes) of this message's body.

  • Return Type

    (int)
  • the size of the message body

putProperty

Add message property.

Parameters

  • key string
  • The name of the property

getProperty

(string key)

returns string | int | float | boolean | byte | byte[] | () | error

Get a message property.

Parameters

  • key string
  • The name of the property

getType

()

returns MessageType

The type of the message.

  • Return Type

    (MessageType)
  • The MessageType of the message

getPayload

()

returns string | byte[] | map | error | ()

The message payload.

  • Return Type

    (string | byte[] | map | error | ())
  • The message payload or error on failure to retrieve payload or if the type is unsupported. A map payload can contain an error if the type is unsupported.

saveToWritableByteChannel

(WritableByteChannel ch)

returns error?

Call this function to save to a WritableByteChannel if the message is STREAM type.

Parameters

  • Return Type

    (error?)
  • will return an error if the message is not of type STREAM or on failure

getConfig

()

returns MessageConfiguration

Get the message configuration.