public class DefaultMessagePropertiesConverter extends Object implements MessagePropertiesConverter
MessagePropertiesConverter strategy.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMessagePropertiesConverter.CorrelationIdPolicy
Deprecated.
|
| 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(MessageProperties source,
String charset) |
void |
setCorrelationIdAsString(DefaultMessagePropertiesConverter.CorrelationIdPolicy correlationIPolicy)
Deprecated.
- the byte[] version of correlation id will be removed in 2.0
|
void |
setCorrelationIdPolicy(DefaultMessagePropertiesConverter.CorrelationIdPolicy correlationIPolicy)
Deprecated.
- the byte[] version of correlation id will be removed in 2.0
|
MessageProperties |
toMessageProperties(com.rabbitmq.client.AMQP.BasicProperties source,
com.rabbitmq.client.Envelope envelope,
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.@Deprecated public void setCorrelationIdAsString(DefaultMessagePropertiesConverter.CorrelationIdPolicy correlationIPolicy)
correlationIPolicy - true to use.setCorrelationIdPolicy(CorrelationIdPolicy)@Deprecated public void setCorrelationIdPolicy(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 MessageProperties toMessageProperties(com.rabbitmq.client.AMQP.BasicProperties source, com.rabbitmq.client.Envelope envelope, String charset)
toMessageProperties in interface MessagePropertiesConverterpublic com.rabbitmq.client.AMQP.BasicProperties fromMessageProperties(MessageProperties source, String charset)
fromMessageProperties in interface MessagePropertiesConverter