Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 65D47200C2F for ; Mon, 6 Mar 2017 09:51:37 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 64990160B73; Mon, 6 Mar 2017 08:51:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ACBDA160B76 for ; Mon, 6 Mar 2017 09:51:36 +0100 (CET) Received: (qmail 47590 invoked by uid 500); 6 Mar 2017 08:51:35 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 47581 invoked by uid 99); 6 Mar 2017 08:51:35 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Mar 2017 08:51:35 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 70B8818495F for ; Mon, 6 Mar 2017 08:51:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.547 X-Spam-Level: X-Spam-Status: No, score=-1.547 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id unASnRyRX9CY for ; Mon, 6 Mar 2017 08:51:34 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5E1215FB62 for ; Mon, 6 Mar 2017 08:51:34 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8C047E08C3 for ; Mon, 6 Mar 2017 08:51:33 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E5F9724170 for ; Mon, 6 Mar 2017 08:51:32 +0000 (UTC) Date: Mon, 6 Mar 2017 08:51:32 +0000 (UTC) From: "Luca Burgazzoli (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10820) DefaultFluentProducerTemplate mixes up data when sending asynchronously MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 06 Mar 2017 08:51:37 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15896917#comment-15896917 ] Luca Burgazzoli commented on CAMEL-10820: ----------------------------------------- We may also delay the creation of default exchangeSupplier/processorSupplier so that for async* operation we can make a copy of the values only if needed > 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 > Fix For: 2.18.4, 2.19.0 > > Attachments: default_fluent_producer_template.diff > > > 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)