Fix Compressed contentEncoding Delimiter
Resolves https://github.com/spring-projects/spring-amqp/issues/1251 Delimiter should be a comma and whitespace trimmeed. Handle both delimiters in decompressors and add property for backwards compatibility. **I will backport to 2.2.x with default `:`** * Do not add a delimiter if the original encoding is an empty String.
This commit is contained in:
@@ -3946,6 +3946,12 @@ By default, these properties are reused for performance reasons, and modified wi
|
||||
If you retain a reference to the original outbound message, its properties will change as well.
|
||||
So, if your application retains a copy of an outbound message with these message post processors, consider turning the `copyProperties` option on.
|
||||
|
||||
IMPORTANT: Starting with version 2.2.12, you can configure the delimiter that the compressing post processors use between content encoding elements.
|
||||
With versions 2.2.11 and before, this was hard-coded as `:`, it is now set to `, ` by default.
|
||||
The decompressors will work with both delimiters.
|
||||
However, if you publish messages with 2.3 or later and consume with 2.2.11 or earlier, you MUST set the `encodingDelimiter` property on the compressor(s) to `:`.
|
||||
When your consumers are upgraded to 2.2.11 or later, you can revert to the default of `, `.
|
||||
|
||||
Similarly, the `SimpleMessageListenerContainer` also has a `setAfterReceivePostProcessors()` method, letting the decompression be performed after messages are received by the container.
|
||||
|
||||
Starting with version 2.1.4, `addBeforePublishPostProcessors()` and `addAfterReceivePostProcessors()` have been added to the `RabbitTemplate` to allow appending new post processors to the list of before publish and after receive post processors respectively.
|
||||
|
||||
@@ -38,3 +38,9 @@ See <<template-confirms>> for more information.
|
||||
|
||||
A new listener container property `consumeDelay` is now available; it is helpful when using the https://github.com/rabbitmq/rabbitmq-sharding[RabbitMQ Sharding Plugin].
|
||||
See <<containerAttributes>> for more information.
|
||||
|
||||
==== MessagePostProcessor Changes
|
||||
|
||||
The compressing `MessagePostProcessor` s now use a comma to separate multiple content encodings instead of a colon.
|
||||
The decompressors can handle both formats but, if you produce messages with this version that are consumed by versions earlier than 2.2.12, you should configure the compressor to use the old delimiter.
|
||||
See the IMPORTANT note in <<post-processing>> for more information.
|
||||
|
||||
Reference in New Issue
Block a user