public enum MessageFormat extends java.lang.Enum<MessageFormat>
Enum Constant and Description |
---|
V1
String representation of the message only contains the message payload; no header attributes supported.
|
V2
String representation of the message contains version, header attributes and payload in JSON format
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SYNAPSE_MSG_COMPACTIONKEY |
static java.lang.String |
SYNAPSE_MSG_FORMAT |
static java.lang.String |
SYNAPSE_MSG_HEADERS |
static java.lang.String |
SYNAPSE_MSG_KEY |
static java.lang.String |
SYNAPSE_MSG_PARTITIONKEY |
static java.lang.String |
SYNAPSE_MSG_PAYLOAD |
Modifier and Type | Method and Description |
---|---|
static MessageFormat |
defaultMessageFormat()
Returns the default message format used by Synapse to encode messages.
|
static MessageFormat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MessageFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static MessageFormat |
versionOf(java.lang.String message)
Determines the
MessageFormat from the string representation of some message. |
public static final MessageFormat V1
public static final MessageFormat V2
public static final java.lang.String SYNAPSE_MSG_FORMAT
public static final java.lang.String SYNAPSE_MSG_KEY
public static final java.lang.String SYNAPSE_MSG_COMPACTIONKEY
public static final java.lang.String SYNAPSE_MSG_PARTITIONKEY
public static final java.lang.String SYNAPSE_MSG_HEADERS
public static final java.lang.String SYNAPSE_MSG_PAYLOAD
public static MessageFormat[] values()
for (MessageFormat c : MessageFormat.values()) System.out.println(c);
public static MessageFormat valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static MessageFormat defaultMessageFormat()
public static MessageFormat versionOf(java.lang.String message)
MessageFormat
from the string representation of some message.message
- the string representation of some message