public class DefaultMessagePropertiesConverter extends java.lang.Object implements MessagePropertiesConverter
MessagePropertiesConverter strategy.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMessagePropertiesConverter.CorrelationIdPolicy |
| Constructor and Description |
|---|
DefaultMessagePropertiesConverter()
Construct an instance where
LongStrings will be returned
unconverted when longer than 1024 bytes. |
DefaultMessagePropertiesConverter(int longStringLimit)
Construct an instance where
LongStrings will be returned
unconverted when longer than this limit. |
DefaultMessagePropertiesConverter(int longStringLimit,
boolean convertLongLongStrings)
Construct an instance where
LongStrings will be returned
unconverted or as a DataInputStream when longer than this limit. |
| Modifier and Type | Method and Description |
|---|---|
com.rabbitmq.client.AMQP.BasicProperties |
fromMessageProperties(org.springframework.amqp.core.MessageProperties source,
java.lang.String charset) |
void |
setCorrelationIdAsString(DefaultMessagePropertiesConverter.CorrelationIdPolicy correlationIPolicy)
For inbound, determine whether correlationId, correlationIdString or
both are populated.
|
org.springframework.amqp.core.MessageProperties |
toMessageProperties(com.rabbitmq.client.AMQP.BasicProperties source,
com.rabbitmq.client.Envelope envelope,
java.lang.String charset) |
public DefaultMessagePropertiesConverter()
LongStrings will be returned
unconverted when longer than 1024 bytes.public DefaultMessagePropertiesConverter(int longStringLimit)
LongStrings will be returned
unconverted when longer than this limit.longStringLimit - the limit.public DefaultMessagePropertiesConverter(int longStringLimit,
boolean convertLongLongStrings)
LongStrings will be returned
unconverted or as a DataInputStream when longer than this limit.
Use this constructor with 'true' to restore pre-1.6 behavior.longStringLimit - the limit.convertLongLongStrings - LongString when false,
DataInputStream when true.public void setCorrelationIdAsString(DefaultMessagePropertiesConverter.CorrelationIdPolicy correlationIPolicy)
CorrelationIdPolicy.BOTH
is set for outbound, String takes priority and we fallback to bytes.
Default CorrelationIdPolicy.BYTES.correlationIPolicy - true to use.public org.springframework.amqp.core.MessageProperties toMessageProperties(com.rabbitmq.client.AMQP.BasicProperties source,
com.rabbitmq.client.Envelope envelope,
java.lang.String charset)
toMessageProperties in interface MessagePropertiesConverterpublic com.rabbitmq.client.AMQP.BasicProperties fromMessageProperties(org.springframework.amqp.core.MessageProperties source,
java.lang.String charset)
fromMessageProperties in interface MessagePropertiesConverter