Class DefaultMessagePropertiesConverter
java.lang.Object
org.springframework.amqp.rabbit.support.DefaultMessagePropertiesConverter
- All Implemented Interfaces:
MessagePropertiesConverter
Default implementation of the
MessagePropertiesConverter strategy.- Since:
- 1.0
- Author:
- Mark Fisher, Gary Russell, Soeren Unruh, Raylax Grey, Artem Bilan, Ngoc Nhan, Johan Kaving, Raul Avila
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an instance whereLongStrings will be returned unconverted when longer than 1024 bytes.DefaultMessagePropertiesConverter(int longStringLimit) Construct an instance whereLongStrings will be returned unconverted when longer than this limit.DefaultMessagePropertiesConverter(int longStringLimit, boolean convertLongLongStrings) Construct an instance whereLongStrings will be returned unconverted or as aDataInputStreamwhen longer than this limit. -
Method Summary
Modifier and TypeMethodDescriptioncom.rabbitmq.client.AMQP.BasicPropertiesfromMessageProperties(MessageProperties source, String charset) toMessageProperties(com.rabbitmq.client.AMQP.BasicProperties source, com.rabbitmq.client.Envelope envelope, String charset)
-
Constructor Details
-
DefaultMessagePropertiesConverter
public DefaultMessagePropertiesConverter()Construct an instance whereLongStrings will be returned unconverted when longer than 1024 bytes. -
DefaultMessagePropertiesConverter
public DefaultMessagePropertiesConverter(int longStringLimit) Construct an instance whereLongStrings will be returned unconverted when longer than this limit.- Parameters:
longStringLimit- the limit.- Since:
- 1.4.4
-
DefaultMessagePropertiesConverter
public DefaultMessagePropertiesConverter(int longStringLimit, boolean convertLongLongStrings) Construct an instance whereLongStrings will be returned unconverted or as aDataInputStreamwhen longer than this limit. Use this constructor with 'true' to restore pre-1.6 behavior.- Parameters:
longStringLimit- the limit.convertLongLongStrings-LongStringwhen false,DataInputStreamwhen true.- Since:
- 1.6
-
-
Method Details
-
toMessageProperties
public MessageProperties toMessageProperties(com.rabbitmq.client.AMQP.BasicProperties source, @Nullable com.rabbitmq.client.Envelope envelope, String charset) - Specified by:
toMessagePropertiesin interfaceMessagePropertiesConverter
-
fromMessageProperties
public com.rabbitmq.client.AMQP.BasicProperties fromMessageProperties(MessageProperties source, String charset) - Specified by:
fromMessagePropertiesin interfaceMessagePropertiesConverter
-