Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E5F7110E0D for ; Fri, 30 May 2014 12:02:08 +0000 (UTC) Received: (qmail 47529 invoked by uid 500); 30 May 2014 12:02:08 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 47482 invoked by uid 500); 30 May 2014 12:02:08 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 47474 invoked by uid 99); 30 May 2014 12:02:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2014 12:02:08 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stasiekk@gmail.com designates 209.85.192.45 as permitted sender) Received: from [209.85.192.45] (HELO mail-qg0-f45.google.com) (209.85.192.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2014 12:02:05 +0000 Received: by mail-qg0-f45.google.com with SMTP id z60so4909753qgd.18 for ; Fri, 30 May 2014 05:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hGVxdTA30iXKrDDb8EOMRW5V3F3lMZsKKIIZM3AFrGQ=; b=L7ny0gF04YTC+ObJP8ToCk+rwPRub2PyFEZkNvfyi8+1gd+nOSiI0BfQq+hfyFdVs2 HJcQ72/ItOeIyGAA1M/3bqjYcKQVWNWdu6Epr5jcugeBe/wi0GSKFmxt9vnaIxqB8qN7 tehCZWVxBgRl5LXIy9ObJ/EwLcXOyevAsZhz9nhaeLANJd76lyHBSgZF0ZF7GCmY7zvR jlJsG/KUU7+/R6KjcXVpvM/QOa9uRizU8lzALwdK4AOTpb3ySQZhOulgoiTdPYYwGVxL sW6jLjvJG4uHIKhRDRn4RprXuPmjTXA6iA9EaA/lggXxGL637HSJdWpueQtXb1x2r7jt Jd4Q== MIME-Version: 1.0 X-Received: by 10.140.81.146 with SMTP id f18mr19595676qgd.47.1401451301695; Fri, 30 May 2014 05:01:41 -0700 (PDT) Received: by 10.140.85.163 with HTTP; Fri, 30 May 2014 05:01:41 -0700 (PDT) In-Reply-To: References: Date: Fri, 30 May 2014 14:01:41 +0200 Message-ID: Subject: Re: WireTap Problem From: =?UTF-8?B?U3RhbmlzxYJhdyBLdcWb?= To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a11c1299c01fb6304fa9ccf7e X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1299c01fb6304fa9ccf7e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I send json in form of String with streamCacheing enabled - since both Threads only read from stream and it's cached it shouldn't be a problem or I'm wrong? Best, Stanislaw On Fri, May 30, 2014 at 11:09 AM, Claus Ibsen wrote= : > Hi > > Beware the wire tap does not do a deep clone of the data, so you may > have concurrent threads work on the same instance. > > You can convert your data to a byte[] or String which would is > immutable and would not have side effects etc. > > > > On Fri, May 30, 2014 at 10:54 AM, Stanis=C5=82aw Ku=C5=9B > wrote: > > Hi, > > > > recently I have experienced a nondeterministic problem while using > wireTap > > in my route (Camel 2.13.0). > > > > I assume that wireTap should be transparent to main Route proccessing ( > > http://www.enterpriseintegrationpatterns.com/WireTap.html). > > > > from("direct:route1").routeId("route1") > > .setExchangePattern(ExchangePattern.InOut).streamCaching() > > .marshal().json(JsonLibrary.Jackson) > > > > > .wireTap("direct:logIt").to("direct:httpsCall").wireTap("direct:logItAfte= r").... > > > > Wiretap Route: > > > > > from("direct:logIt").setExchangePattern(ExchangePattern.InOnly).streamCa= ching().convertBodyTo(String.class).to("file:serverCall/request?autoCreate= =3Dtrue"); > > > > > > The problem appears as I try to call the route several times with the > same > > data - sometimes after wireTap the *body is null *causing errors on > called > > server. > > > > It's a bug in Camel or I'm doing something wrong? > > > > Thanks in advance for Your support, > > > > Best regards, > > Stanislaw Kus > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cibsen@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/ > --001a11c1299c01fb6304fa9ccf7e--