@ProviderType public interface Message extends InteroperabilitySupport, Serializable
InteroperabilitySupport.RestInteroperabilitySupport| Modifier and Type | Method and Description |
|---|---|
String |
dump()
Produces a human-readable dump of the message properties and its contents.
|
String |
getApplicationMessageId()
Gets an optional application message identifier when sender application set one.
|
String |
getApplicationMessageType()
Gets the application message type.
|
String |
getCorrelationId()
Gets the correlation identifier passed from a message producer.
|
Object |
getCorrelationKey()
Gets the correlation key passed from a message producer.
|
long |
getExpiration()
The UTC time (in milliseconds) in Epoch time when the message is supposed to expire.
|
byte[] |
getPayloadAsBytes()
Gets the raw payload of the message as a
byte array. |
String |
getPayloadAsString()
Gets the payload as a UTF-8 decoded as a
String. |
int |
getPriority()
Gets priority value in the range of 0 - 255, or -1 if it is not set.
|
Map<String,String> |
getProperties()
Gets the non-solace properties attached to the message.
|
String |
getProperty(String name)
Gets the value of a specific non-solace property.
|
long |
getSequenceNumber()
Gets the sequence number.
|
boolean |
hasContent()
Checks whether the message has content.
|
boolean |
hasProperty(String name)
Checks if the message has a specific non-solace property attached.
|
getRestInteroperabilitySupportString dump()
String representation of the message, to be used for debuggingString getApplicationMessageId()
null or empty if
not setString getApplicationMessageType()
null if not setString getCorrelationId()
nullObject getCorrelationKey()
null is returned when the message is received from a producer.long getExpiration()
A value of 0 means the message never expires. The default value is 0.
byte[] getPayloadAsBytes()
byte array.byte[] containing the message payloadString getPayloadAsString()
String.int getPriority()
Map<String,String> getProperties()
Any property defined in SolaceProperties.MessageProperties
is not included in the returned Map. Solace defined property keys begin with
"solace.messaging", however any key even those beginning with "solace." may be a non solace
property if it is not defined in this API.
Map that's an unmodifiable view of the properties map.String getProperty(String name)
Any property defined in SolaceProperties.MessageProperties
is not available and this method will return null. Solace defined property keys begin with
"solace.messaging", however any key even those beginning with "solace." may be a non solace
property if it is not defined in this API.
name - the name of the propertynull if the property was not definedlong getSequenceNumber()
boolean hasContent()
true if the message has content, false otherwiseboolean hasProperty(String name)
Any property defined in SolaceProperties.MessageProperties
is not available and this method will return false. Solace defined property keys begin with
"solace.messaging", however any key even those beginning with "solace." may be a non solace
property if it is not defined in this API.
name - the name of the property to checktrue only if the message has the specified property, false otherwiseCopyright 2019-2025 Solace Corporation. All rights reserved.