Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.18.2
-
None
-
eclipse, win7, gradle
-
Unknown
Description
DefaultFluentProducerTemplate
code:
producer = context.createFluentProducerTemplate();
future1 = producer.withHeader("action", "register").withBody(body1).asyncSend();
future2 = producer.withHeader("action", "register").withBody(body2).asyncSend();
These two subsequent calls produces with the default creation two calls with the same body - body2.
The cause is that it uses default processor supplier () -> this::populateExchange which is call lazily at the time of send and at that time the body property of DefaultFluentProducerTemplate is body2.