org.apache.activemq.artemis.api.core

## Interface Message

- All Known Subinterfaces:
    ClientMessage, ICoreMessage
  All Known Implementing Classes:
    RefCountMessage

      public interface Message

  A Message is a routable instance that has a payload.

  The payload (the "body") is opaque to the messaging system. A Message also has a fixed set of headers (required by the messaging system) and properties (defined by the users) that can be used by the messaging system to route the message (e.g. to ensure it matches a queue filter).

  ## Message Properties

  Message can contain properties specified by the users. It is possible to convert from some types to other types as specified by the following table:

       |        | boolean byte short int long float double String byte[]
       |----------------------------------------------------------------
       |boolean |    X                                      X
       |byte    |          X    X    X   X                  X
       |short   |               X    X   X                  X
       |int     |                    X   X                  X
       |long    |                        X                  X
       |float   |                              X     X      X
       |double  |                                    X      X
       |String  |    X     X    X    X   X     X     X      X
       |byte[]  |                                                   X
       |-----------------------------------------------------------------

  If conversion is not allowed (for example calling `getFloatProperty` on a property set a `boolean`), a `ActiveMQPropertyConversionException` will be thrown. User cases that will be covered by Message Receiving a buffer: Message encode = new CoreMessage(); // or any other implementation encode.receiveBuffer(buffer); Sending to a buffer: Message encode; size = encode.getEncodeSize(); encode.encodeDirectly(bufferOutput);

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static byte` | `BYTES_TYPE`
    `static byte` | `DEFAULT_TYPE`
    `static byte` | `EMBEDDED_TYPE` The message will contain another message persisted through `EmbedMessageUtil`
    `static SimpleString` | `HDR_ACTUAL_EXPIRY_TIME` the actual time the message was expired.
    `static SimpleString` | `HDR_BRIDGE_DUPLICATE_ID`
    `static SimpleString` | `HDR_CONTENT_TYPE` To define the mime-type of body messages.
    `static SimpleString` | `HDR_DUPLICATE_DETECTION_ID` To be used with duplicate detection.
    `static SimpleString` | `HDR_GROUP_ID` For the Message Grouping feature.
    `static SimpleString` | `HDR_LARGE_BODY_SIZE` The body size of a large message before it was compressed.
    `static SimpleString` | `HDR_LARGE_COMPRESSED` to determine if the Large Message was compressed.
    `static SimpleString` | `HDR_LAST_VALUE_NAME` To be used with Last value queues.
    `static SimpleString` | `HDR_ORIG_MESSAGE_ID` The original message ID before the message was transferred.
    `static SimpleString` | `HDR_ORIGINAL_ADDRESS` The original address of a message when a message is diverted or transferred through DLQ or expiry
    `static SimpleString` | `HDR_ORIGINAL_QUEUE` The original address of a message when a message is transferred through DLQ or expiry
    `static SimpleString` | `HDR_PREFIX` The prefix used (if any) when sending this message.
    `static SimpleString` | `HDR_ROUTE_TO_ACK_IDS`
    `static SimpleString` | `HDR_ROUTE_TO_IDS`
    `static SimpleString` | `HDR_ROUTING_TYPE` The Routing Type for this message.
    `static SimpleString` | `HDR_SCALEDOWN_TO_IDS`
    `static SimpleString` | `HDR_SCHEDULED_DELIVERY_TIME` To be used with Scheduled Delivery.
    `static SimpleString` | `HDR_VALIDATED_USER` The name of the validated user who sent the message.
    `static byte` | `MAP_TYPE`
    `static int` | `memoryOffset`
    `static byte` | `OBJECT_TYPE`
    `static byte` | `STREAM_TYPE`
    `static byte` | `TEXT_TYPE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `default boolean` | `acceptsConsumer(long uniqueConsumerID)`
    `default void` | `cleanupInternalProperties()`
    `boolean` | `containsProperty(SimpleString key)`
    `boolean` | `containsProperty(String key)`
    `Message` | `copy()` It will generate a new instance of the message encode, being a deep copy, new properties, new everything
    `Message` | `copy(long newID)` It will generate a new instance of the message encode, being a deep copy, new properties, new everything
    `int` | `decrementDurableRefCount()`
    `int` | `decrementRefCount()`
    `String` | `getAddress()`
    `SimpleString` | `getAddressSimpleString()`
    `Object` | `getAnnotation(SimpleString key)`
    `default String` | `getAnnotationString(SimpleString key)`
    `default ActiveMQBuffer` | `getBodyBuffer()` Deprecated. do not use this, use through ICoreMessage or ClientMessage
    `default InputStream` | `getBodyInputStream()` Deprecated. do not use this, use through ICoreMessage or ClientMessage
    `Boolean` | `getBooleanProperty(SimpleString key)`
    `Boolean` | `getBooleanProperty(String key)`
    `io.netty.buffer.ByteBuf` | `getBuffer()`
    `Byte` | `getByteProperty(SimpleString key)`
    `Byte` | `getByteProperty(String key)`
    `byte[]` | `getBytesProperty(SimpleString key)`
    `byte[]` | `getBytesProperty(String key)`
    `default String` | `getConnectionID()`
    `RefCountMessageListener` | `getContext()` Context can be used by the application server to inject extra control, like a protocol specific on the server.
    `Double` | `getDoubleProperty(SimpleString key)`
    `Double` | `getDoubleProperty(String key)`
    `default byte[]` | `getDuplicateIDBytes()` it will translate a property named HDR_DUPLICATE_DETECTION_ID.
    `default Object` | `getDuplicateProperty()`
    `int` | `getEncodeSize()` Returns the size of the encoded message.
    `long` | `getExpiration()` Returns the expiration time of this message.
    `default byte[]` | `getExtraBytesProperty(SimpleString key)`
    `Float` | `getFloatProperty(SimpleString key)`
    `Float` | `getFloatProperty(String key)`
    `default SimpleString` | `getGroupID()`
    `Integer` | `getIntProperty(SimpleString key)`
    `Integer` | `getIntProperty(String key)`
    `default SimpleString` | `getLastValueProperty()`
    `Long` | `getLongProperty(SimpleString key)`
    `Long` | `getLongProperty(String key)`
    `int` | `getMemoryEstimate()`
    `long` | `getMessageID()` Returns the messageID.
    `Object` | `getObjectProperty(SimpleString key)`
    `Object` | `getObjectProperty(String key)`
    `long` | `getPersistentSize()` This is the size of the message when persisted on disk which is used for metrics tracking Note that even if the message itself is not persisted on disk (ie non-durable) this value is still used for metrics tracking If a normal message it will be the encoded message size If a large message it will be encoded message size + large message body size
    `org.apache.activemq.artemis.core.persistence.Persister<Message>` | `getPersister()`
    `int` | `getPersistSize()`
    `byte` | `getPriority()` Returns the message priority.
    `Set<SimpleString>` | `getPropertyNames()` Returns all the names of the properties for this message.
    `int` | `getRefCount()`
    `SimpleString` | `getReplyTo()`
    `default RoutingType` | `getRoutingType()`
    `Long` | `getScheduledDeliveryTime()` Used to calculate what is the delivery time.
    `Short` | `getShortProperty(SimpleString key)`
    `Short` | `getShortProperty(String key)`
    `SimpleString` | `getSimpleStringProperty(SimpleString key)`
    `SimpleString` | `getSimpleStringProperty(String key)`
    `String` | `getStringProperty(SimpleString key)`
    `String` | `getStringProperty(String key)`
    `long` | `getTimestamp()`
    `default byte` | `getType()` Deprecated. do not use this, use through ICoreMessage or ClientMessage
    `Object` | `getUserID()` This represents historically the JMSMessageID.
    `default String` | `getValidatedUserID()`
    `int` | `incrementDurableRefCount()`
    `int` | `incrementRefCount()`
    `boolean` | `isDurable()` Returns whether this message is durable or not.
    `default boolean` | `isExpired()` Returns whether this message is expired or not.
    `default boolean` | `isLargeMessage()`
    `void` | `messageChanged()`
    `void` | `persist(ActiveMQBuffer targetRecord)`
    `Message` | `putBooleanProperty(SimpleString key, boolean value)`
    `Message` | `putBooleanProperty(String key, boolean value)`
    `Message` | `putByteProperty(SimpleString key, byte value)`
    `Message` | `putByteProperty(String key, byte value)`
    `Message` | `putBytesProperty(SimpleString key, byte[] value)`
    `Message` | `putBytesProperty(String key, byte[] value)`
    `Message` | `putCharProperty(SimpleString key, char value)`
    `Message` | `putCharProperty(String key, char value)`
    `Message` | `putDoubleProperty(SimpleString key, double value)`
    `Message` | `putDoubleProperty(String key, double value)`
    `default Message` | `putExtraBytesProperty(SimpleString key, byte[] value)`
    `Message` | `putFloatProperty(SimpleString key, float value)`
    `Message` | `putFloatProperty(String key, float value)`
    `Message` | `putIntProperty(SimpleString key, int value)`
    `Message` | `putIntProperty(String key, int value)`
    `Message` | `putLongProperty(SimpleString key, long value)`
    `Message` | `putLongProperty(String key, long value)`
    `Message` | `putObjectProperty(SimpleString key, Object value)`
    `Message` | `putObjectProperty(String key, Object value)`
    `Message` | `putShortProperty(SimpleString key, short value)`
    `Message` | `putShortProperty(String key, short value)`
    `Message` | `putStringProperty(SimpleString key, SimpleString value)`
    `Message` | `putStringProperty(SimpleString key, String value)`
    `Message` | `putStringProperty(String key, String value)` Puts a String property in this message.
    `void` | `receiveBuffer(io.netty.buffer.ByteBuf buffer)` Used to receive this message from an encoded medium buffer
    `default void` | `reencode()`
    `default void` | `referenceOriginalMessage(Message original, String originalQueue)`
    `default void` | `rejectConsumer(long uniqueConsumerID)`
    `default void` | `releaseBuffer()`
    `void` | `reloadPersistence(ActiveMQBuffer record)`
    `default Object` | `removeAnnotation(SimpleString key)`
    `default byte[]` | `removeExtraBytesProperty(SimpleString key)`
    `Object` | `removeProperty(SimpleString key)`
    `Object` | `removeProperty(String key)`
    `void` | `sendBuffer(io.netty.buffer.ByteBuf buffer, int deliveryCount)` Used to send this message to an encoded medium buffer.
    `Message` | `setAddress(SimpleString address)` This will set the address on CoreMessage.
    `Message` | `setAddress(String address)` Look at `setAddress(SimpleString)` for the doc.
    `default Message` | `setAnnotation(SimpleString key, Object value)` Callers must call `reencode()` in order to be sent to clients
    `Message` | `setBuffer(io.netty.buffer.ByteBuf buffer)` The buffer will belong to this message, until release is called.
    `default Message` | `setConnectionID(String connectionID)`
    `Message` | `setContext(RefCountMessageListener context)`
    `Message` | `setDurable(boolean durable)` Sets whether this message is durable or not.
    `Message` | `setExpiration(long expiration)` Sets the expiration of this message.
    `default Message` | `setLastValueProperty(SimpleString lastValueName)`
    `Message` | `setMessageID(long id)`
    `Message` | `setPriority(byte priority)` Sets the message priority.
    `Message` | `setReplyTo(SimpleString address)`
    `default Message` | `setRoutingType(RoutingType routingType)`
    `default Message` | `setScheduledDeliveryTime(Long time)`
    `Message` | `setTimestamp(long timestamp)`
    `default Message` | `setType(byte type)` Deprecated. do not use this, use through ICoreMessage or ClientMessage
    `Message` | `setUserID(Object userID)`
    `default Message` | `setValidatedUserID(String validatedUserID)`
    `ICoreMessage` | `toCore()` This should make you convert your message into Core format.
    `ICoreMessage` | `toCore(org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools coreMessageObjectPools)` This should make you convert your message into Core format.
    `default Map<String,Object>` | `toMap()`
    `default Map<String,Object>` | `toPropertyMap()`

- - ### Field Detail

    - #### memoryOffset

          static final int memoryOffset

      See Also:
        Constant Field Values

    - #### HDR_ROUTE_TO_IDS

          static final SimpleString HDR_ROUTE_TO_IDS

    - #### HDR_SCALEDOWN_TO_IDS

          static final SimpleString HDR_SCALEDOWN_TO_IDS

    - #### HDR_ROUTE_TO_ACK_IDS

          static final SimpleString HDR_ROUTE_TO_ACK_IDS

    - #### HDR_BRIDGE_DUPLICATE_ID

          static final SimpleString HDR_BRIDGE_DUPLICATE_ID

    - #### HDR_ACTUAL_EXPIRY_TIME

          static final SimpleString HDR_ACTUAL_EXPIRY_TIME

      the actual time the message was expired. * *

    - #### HDR_ORIGINAL_ADDRESS

          static final SimpleString HDR_ORIGINAL_ADDRESS

      The original address of a message when a message is diverted or transferred through DLQ or expiry

    - #### HDR_ORIGINAL_QUEUE

          static final SimpleString HDR_ORIGINAL_QUEUE

      The original address of a message when a message is transferred through DLQ or expiry

    - #### HDR_ORIG_MESSAGE_ID

          static final SimpleString HDR_ORIG_MESSAGE_ID

      The original message ID before the message was transferred.

    - #### HDR_GROUP_ID

          static final SimpleString HDR_GROUP_ID

      For the Message Grouping feature.

    - #### HDR_LARGE_COMPRESSED

          static final SimpleString HDR_LARGE_COMPRESSED

      to determine if the Large Message was compressed.

    - #### HDR_LARGE_BODY_SIZE

          static final SimpleString HDR_LARGE_BODY_SIZE

      The body size of a large message before it was compressed.

    - #### HDR_SCHEDULED_DELIVERY_TIME

          static final SimpleString HDR_SCHEDULED_DELIVERY_TIME

      To be used with Scheduled Delivery.

    - #### HDR_DUPLICATE_DETECTION_ID

          static final SimpleString HDR_DUPLICATE_DETECTION_ID

      To be used with duplicate detection.

    - #### HDR_LAST_VALUE_NAME

          static final SimpleString HDR_LAST_VALUE_NAME

      To be used with Last value queues.

    - #### HDR_CONTENT_TYPE

          static final SimpleString HDR_CONTENT_TYPE

      To define the mime-type of body messages. Mainly for stomp but it could be informed on any message for user purposes.

    - #### HDR_VALIDATED_USER

          static final SimpleString HDR_VALIDATED_USER

      The name of the validated user who sent the message. Useful for auditing.

    - #### HDR_ROUTING_TYPE

          static final SimpleString HDR_ROUTING_TYPE

      The Routing Type for this message. Ensures that this message is only routed to queues with matching routing type.

    - #### HDR_PREFIX

          static final SimpleString HDR_PREFIX

      The prefix used (if any) when sending this message. For protocols (e.g. STOMP) that need to track this and restore the prefix when the message is consumed.

    - #### DEFAULT_TYPE

          static final byte DEFAULT_TYPE

      See Also:
        Constant Field Values

    - #### OBJECT_TYPE

          static final byte OBJECT_TYPE

      See Also:
        Constant Field Values

    - #### TEXT_TYPE

          static final byte TEXT_TYPE

      See Also:
        Constant Field Values

    - #### BYTES_TYPE

          static final byte BYTES_TYPE

      See Also:
        Constant Field Values

    - #### MAP_TYPE

          static final byte MAP_TYPE

      See Also:
        Constant Field Values

    - #### STREAM_TYPE

          static final byte STREAM_TYPE

      See Also:
        Constant Field Values

    - #### EMBEDDED_TYPE

          static final byte EMBEDDED_TYPE

      The message will contain another message persisted through `EmbedMessageUtil`
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### cleanupInternalProperties

          default void cleanupInternalProperties()

    - #### getRoutingType

          default RoutingType getRoutingType()

    - #### setRoutingType

          default Message setRoutingType(RoutingType routingType)

    - #### getLastValueProperty

          default SimpleString getLastValueProperty()

    - #### setLastValueProperty

          default Message setLastValueProperty(SimpleString lastValueName)

    - #### getBodyInputStream

          @Deprecated
          default InputStream getBodyInputStream()

      Deprecated. do not use this, use through ICoreMessage or ClientMessage

    - #### getBodyBuffer

          @Deprecated
          default ActiveMQBuffer getBodyBuffer()

      Deprecated. do not use this, use through ICoreMessage or ClientMessage

    - #### getType

          @Deprecated
          default byte getType()

      Deprecated. do not use this, use through ICoreMessage or ClientMessage

    - #### setType

          @Deprecated
          default Message setType(byte type)

      Deprecated. do not use this, use through ICoreMessage or ClientMessage

    - #### messageChanged

          void messageChanged()

    - #### getScheduledDeliveryTime

          Long getScheduledDeliveryTime()

      Used to calculate what is the delivery time. Return null if not scheduled.

    - #### setScheduledDeliveryTime

          default Message setScheduledDeliveryTime(Long time)

    - #### getContext

          RefCountMessageListener getContext()

      Context can be used by the application server to inject extra control, like a protocol specific on the server. There is only one per Object, use it wisely! Note: the intent of this was to replace PageStore reference on Message, but it will be later increased by adidn a ServerPojo

    - #### getGroupID

          default SimpleString getGroupID()

    - #### getReplyTo

          SimpleString getReplyTo()

    - #### setReplyTo

          Message setReplyTo(SimpleString address)

    - #### setContext

          Message setContext(RefCountMessageListener context)

    - #### setBuffer

          Message setBuffer(io.netty.buffer.ByteBuf buffer)

      The buffer will belong to this message, until release is called.

    - #### getBuffer

          io.netty.buffer.ByteBuf getBuffer()

    - #### copy

          Message copy()

      It will generate a new instance of the message encode, being a deep copy, new properties, new everything

    - #### copy

          Message copy(long newID)

      It will generate a new instance of the message encode, being a deep copy, new properties, new everything

    - #### acceptsConsumer

          default boolean acceptsConsumer(long uniqueConsumerID)

    - #### rejectConsumer

          default void rejectConsumer(long uniqueConsumerID)

    - #### getMessageID

          long getMessageID()

      Returns the messageID.
      The messageID is set when the message is handled by the server.

    - #### setConnectionID

          default Message setConnectionID(String connectionID)

    - #### getConnectionID

          default String getConnectionID()

    - #### setMessageID

          Message setMessageID(long id)

    - #### isLargeMessage

          default boolean isLargeMessage()

    - #### getExpiration

          long getExpiration()

      Returns the expiration time of this message.

    - #### setExpiration

          Message setExpiration(long expiration)

      Sets the expiration of this message.
      Parameters:
        `expiration` - expiration time

    - #### isExpired

          default boolean isExpired()

      Returns whether this message is expired or not.

    - #### getUserID

          Object getUserID()

      This represents historically the JMSMessageID. We had in the past used this for the MessageID that was sent on core messages... later on when we added AMQP this name clashed with AMQPMessage.getUserID();
      Returns:
        the user id

    - #### setUserID

          Message setUserID(Object userID)

    - #### getValidatedUserID

          default String getValidatedUserID()

    - #### setValidatedUserID

          default Message setValidatedUserID(String validatedUserID)

    - #### isDurable

          boolean isDurable()

      Returns whether this message is durable or not.

    - #### setDurable

          Message setDurable(boolean durable)

      Sets whether this message is durable or not.
      Parameters:
        `durable` - `true` to flag this message as durable, `false` else

    - #### getPersister

          org.apache.activemq.artemis.core.persistence.Persister<Message> getPersister()

    - #### getAddress

          String getAddress()

    - #### setAddress

          Message setAddress(String address)

      Look at `setAddress(SimpleString)` for the doc.
      Parameters:
        `address` -
      Returns:

    - #### getAddressSimpleString

          SimpleString getAddressSimpleString()

    - #### setAddress

          Message setAddress(SimpleString address)

      This will set the address on CoreMessage. Note for AMQPMessages: in AMQPMessages this will not really change the address on the message. Instead it will add a property on extraProperties which only transverse internally at the broker. Whatever you change here it won't affect anything towards the received message. If you wish to change AMQPMessages address you will have to do it directly at the AMQP Message, however beware that AMQPMessages are not supposed to be changed at the broker, so only do it if you know what you are doing.
      Parameters:
        `address` -
      Returns:

    - #### getTimestamp

          long getTimestamp()

    - #### setTimestamp

          Message setTimestamp(long timestamp)

    - #### getPriority

          byte getPriority()

      Returns the message priority.

      Values range from 0 (less priority) to 9 (more priority) inclusive.

    - #### setPriority

          Message setPriority(byte priority)

      Sets the message priority.

      Value must be between 0 and 9 inclusive.

      Parameters:
        `priority` - the new message priority

    - #### receiveBuffer

          void receiveBuffer(io.netty.buffer.ByteBuf buffer)

      Used to receive this message from an encoded medium buffer

    - #### sendBuffer

          void sendBuffer(io.netty.buffer.ByteBuf buffer,
                          int deliveryCount)

      Used to send this message to an encoded medium buffer.
      Parameters:
        `buffer` - the buffer used.
        `deliveryCount` - Some protocols (AMQP) will have this as part of the message.

    - #### getPersistSize

          int getPersistSize()

    - #### persist

          void persist(ActiveMQBuffer targetRecord)

    - #### reloadPersistence

          void reloadPersistence(ActiveMQBuffer record)

    - #### releaseBuffer

          default void releaseBuffer()

    - #### reencode

          default void reencode()

    - #### referenceOriginalMessage

          default void referenceOriginalMessage(Message original,
                                                String originalQueue)

    - #### getDuplicateIDBytes

          default byte[] getDuplicateIDBytes()

      it will translate a property named HDR_DUPLICATE_DETECTION_ID.
      Returns:

    - #### putExtraBytesProperty

          default Message putExtraBytesProperty(SimpleString key,
                                                byte[] value)

    - #### getExtraBytesProperty

          default byte[] getExtraBytesProperty(SimpleString key)
                                        throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### removeExtraBytesProperty

          default byte[] removeExtraBytesProperty(SimpleString key)
                                           throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getDuplicateProperty

          default Object getDuplicateProperty()

    - #### putBooleanProperty

          Message putBooleanProperty(String key,
                                     boolean value)

    - #### putByteProperty

          Message putByteProperty(String key,
                                  byte value)

    - #### putBytesProperty

          Message putBytesProperty(String key,
                                   byte[] value)

    - #### putShortProperty

          Message putShortProperty(String key,
                                   short value)

    - #### putCharProperty

          Message putCharProperty(String key,
                                  char value)

    - #### putIntProperty

          Message putIntProperty(String key,
                                 int value)

    - #### putLongProperty

          Message putLongProperty(String key,
                                  long value)

    - #### putFloatProperty

          Message putFloatProperty(String key,
                                   float value)

    - #### putDoubleProperty

          Message putDoubleProperty(String key,
                                    double value)

    - #### putBooleanProperty

          Message putBooleanProperty(SimpleString key,
                                     boolean value)

    - #### putByteProperty

          Message putByteProperty(SimpleString key,
                                  byte value)

    - #### putBytesProperty

          Message putBytesProperty(SimpleString key,
                                   byte[] value)

    - #### putShortProperty

          Message putShortProperty(SimpleString key,
                                   short value)

    - #### putCharProperty

          Message putCharProperty(SimpleString key,
                                  char value)

    - #### putIntProperty

          Message putIntProperty(SimpleString key,
                                 int value)

    - #### putLongProperty

          Message putLongProperty(SimpleString key,
                                  long value)

    - #### putFloatProperty

          Message putFloatProperty(SimpleString key,
                                   float value)

    - #### putDoubleProperty

          Message putDoubleProperty(SimpleString key,
                                    double value)

    - #### putStringProperty

          Message putStringProperty(String key,
                                    String value)

      Puts a String property in this message.
      Parameters:
        `key` - property name
        `value` - property value

    - #### putObjectProperty

          Message putObjectProperty(String key,
                                    Object value)
                             throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### putObjectProperty

          Message putObjectProperty(SimpleString key,
                                    Object value)
                             throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### removeProperty

          Object removeProperty(String key)

    - #### containsProperty

          boolean containsProperty(String key)

    - #### getBooleanProperty

          Boolean getBooleanProperty(String key)
                              throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getByteProperty

          Byte getByteProperty(String key)
                        throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getDoubleProperty

          Double getDoubleProperty(String key)
                            throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getIntProperty

          Integer getIntProperty(String key)
                          throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getLongProperty

          Long getLongProperty(String key)
                        throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getObjectProperty

          Object getObjectProperty(String key)

    - #### getShortProperty

          Short getShortProperty(String key)
                          throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getFloatProperty

          Float getFloatProperty(String key)
                          throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getStringProperty

          String getStringProperty(String key)
                            throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getSimpleStringProperty

          SimpleString getSimpleStringProperty(String key)
                                        throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getBytesProperty

          byte[] getBytesProperty(String key)
                           throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### removeProperty

          Object removeProperty(SimpleString key)

    - #### containsProperty

          boolean containsProperty(SimpleString key)

    - #### getBooleanProperty

          Boolean getBooleanProperty(SimpleString key)
                              throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getByteProperty

          Byte getByteProperty(SimpleString key)
                        throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getDoubleProperty

          Double getDoubleProperty(SimpleString key)
                            throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getIntProperty

          Integer getIntProperty(SimpleString key)
                          throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getLongProperty

          Long getLongProperty(SimpleString key)
                        throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getObjectProperty

          Object getObjectProperty(SimpleString key)

    - #### removeAnnotation

          default Object removeAnnotation(SimpleString key)

    - #### getAnnotationString

          default String getAnnotationString(SimpleString key)

    - #### getAnnotation

          Object getAnnotation(SimpleString key)

    - #### setAnnotation

          default Message setAnnotation(SimpleString key,
                                        Object value)

      Callers must call `reencode()` in order to be sent to clients

    - #### getShortProperty

          Short getShortProperty(SimpleString key)
                          throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getFloatProperty

          Float getFloatProperty(SimpleString key)
                          throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getStringProperty

          String getStringProperty(SimpleString key)
                            throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getSimpleStringProperty

          SimpleString getSimpleStringProperty(SimpleString key)
                                        throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### getBytesProperty

          byte[] getBytesProperty(SimpleString key)
                           throws ActiveMQPropertyConversionException

      Throws:
        `ActiveMQPropertyConversionException`

    - #### putStringProperty

          Message putStringProperty(SimpleString key,
                                    SimpleString value)

    - #### putStringProperty

          Message putStringProperty(SimpleString key,
                                    String value)

    - #### getEncodeSize

          int getEncodeSize()

      Returns the size of the encoded message.

    - #### getPropertyNames

          Set<SimpleString> getPropertyNames()

      Returns all the names of the properties for this message.

    - #### getRefCount

          int getRefCount()

    - #### incrementRefCount

          int incrementRefCount()
                         throws Exception

      Throws:
        `Exception`

    - #### decrementRefCount

          int decrementRefCount()
                         throws Exception

      Throws:
        `Exception`

    - #### incrementDurableRefCount

          int incrementDurableRefCount()

    - #### decrementDurableRefCount

          int decrementDurableRefCount()

    - #### toMap

          default Map<String,Object> toMap()

      Returns:
        Returns the message in Map form, useful when encoding to JSON

    - #### toPropertyMap

          default Map<String,Object> toPropertyMap()

      Returns:
        Returns the message properties in Map form, useful when encoding to JSON

    - #### toCore

          ICoreMessage toCore()

      This should make you convert your message into Core format.

    - #### toCore

          ICoreMessage toCore(org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools coreMessageObjectPools)

      This should make you convert your message into Core format.

    - #### getMemoryEstimate

          int getMemoryEstimate()

    - #### getPersistentSize

          long getPersistentSize()
                          throws ActiveMQException

      This is the size of the message when persisted on disk which is used for metrics tracking Note that even if the message itself is not persisted on disk (ie non-durable) this value is still used for metrics tracking If a normal message it will be the encoded message size If a large message it will be encoded message size + large message body size
      Returns:
      Throws:
        `ActiveMQException`

Copyright © 2018 The Apache Software Foundation. All rights reserved.