camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanisław Kuś <stasi...@gmail.com>
Subject Re: WireTap Problem
Date Fri, 30 May 2014 12:05:41 GMT
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ław Kuś <stasiekk@gmail.com> 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 or
> I'm wrong?
>
> Best,
> Stanislaw
>
>
>
> On Fri, May 30, 2014 at 11:09 AM, Claus Ibsen <claus.ibsen@gmail.com>
> 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ław Kuś <stasiekk@gmail.com>
>> 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:logItAfter")....
>> >
>> > Wiretap Route:
>> >
>> >
>>  from("direct:logIt").setExchangePattern(ExchangePattern.InOnly).streamCaching().convertBodyTo(String.class).to("file:serverCall/request?autoCreate=true");
>> >
>> >
>> > 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/
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message