Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.15.2
-
None
-
Unknown
Description
org.apache.camel.component.rabbitmq.RabbitMQProducer#buildProperties does not remove message headers from exchange after property is set, leading to message header pollution.
so constructs like
final Object contentType = exchange.getIn().getHeader(RabbitMQConstants.CONTENT_TYPE); if (contentType != null) { properties.contentType(contentType.toString()); }
must be rewritten as
final Object contentType = exchange.getIn().removeHeader(RabbitMQConstants.CONTENT_TYPE); if (contentType != null) { properties.contentType(contentType.toString()); }
I don't think that these are used in business logic as this is solely transport specific.