camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakub Cernohorsky (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-10820) DefaultFluentProducerTemplate mixes up data when sending asynchronously
Date Mon, 13 Feb 2017 12:03:41 GMT
Jakub Cernohorsky created CAMEL-10820:
-----------------------------------------

             Summary: DefaultFluentProducerTemplate mixes up data when sending asynchronously
                 Key: CAMEL-10820
                 URL: https://issues.apache.org/jira/browse/CAMEL-10820
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.18.2
         Environment: eclipse, win7, gradle
            Reporter: Jakub Cernohorsky


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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message