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 36BA910E60 for ; Fri, 30 May 2014 12:06:06 +0000 (UTC) Received: (qmail 54238 invoked by uid 500); 30 May 2014 12:06:05 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 54193 invoked by uid 500); 30 May 2014 12:06:05 -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 54185 invoked by uid 99); 30 May 2014 12:06:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2014 12:06:05 +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 (athena.apache.org: domain of stasiekk@gmail.com designates 209.85.192.52 as permitted sender) Received: from [209.85.192.52] (HELO mail-qg0-f52.google.com) (209.85.192.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2014 12:06:02 +0000 Received: by mail-qg0-f52.google.com with SMTP id a108so4915051qge.39 for ; Fri, 30 May 2014 05:05: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=EhKhtEmuEDW0DPyv+XpvLG4PL4RDeYW764KTBZz9QPQ=; b=KNhsdcmZE4407V3bidlABRwGLGvB5VAjhThwGO3ETnLJgH0/DfM8Vp3LIQK+pHgoUp elpoJ9kLNqchxAnq1xty874u/uhuegJdWcHK4zVyH+rEOtKDbscZt7mpjPBVqk3dtMpm ED8iYwXo3rzfzo8VuMhQvz6zpmhwQGxFdXQMop1G66Bm0sFmmamSx1XYZyTvyXyaNg/m 7/NBiyuZr81wl3faNqbe0GdEWYu9sH6IFXK2BUNIHhLfsnVOtubfMMAQyB14D1v1Ja6D y4t0Bpf4sxn1ZqT2DHqLs5d8wAK1xeS5CHF/i9lNWiBPCNu91HL306s2xdQuiXwwTyBc DkmQ== MIME-Version: 1.0 X-Received: by 10.140.81.146 with SMTP id f18mr19632443qgd.47.1401451541311; Fri, 30 May 2014 05:05:41 -0700 (PDT) Received: by 10.140.85.163 with HTTP; Fri, 30 May 2014 05:05:41 -0700 (PDT) In-Reply-To: References: Date: Fri, 30 May 2014 14:05:41 +0200 Message-ID: Subject: Re: WireTap Problem From: =?UTF-8?B?U3RhbmlzxYJhdyBLdcWb?= To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a11c1299c4a372d04fa9cdd0c X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1299c4a372d04fa9cdd0c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Nevertheless with String is working so far - so my Route must change the stream somehow. Thanks a lot for support ! Best regards, Stanislaw On Fri, May 30, 2014 at 2:01 PM, Stanis=C5=82aw Ku=C5=9B wrote: > 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 o= r > 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:logItAft= er").... >> > >> > Wiretap Route: >> > >> > >> from("direct:logIt").setExchangePattern(ExchangePattern.InOnly).streamC= aching().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/ >> > > --001a11c1299c4a372d04fa9cdd0c--