Hi

Yeah sounds good if you continue your investigations and then keep the
JIRA up to date when you have more details.

Its also sometimes a good idea from the JIRA ticket to add a link to
this thread so ppl can find back here.

On Thu, Aug 29, 2013 at 7:14 PM, abdiels <abdi...@gmail.com> wrote:
> ok, after looking further at this, we discovered that we were under the wrong
> assumption on how the splitter in Camel works.  We got that assumption after
> playing with the ZipSpliter.  After running into this problem, we played
> with simple spliters, we figured that our assumption was wrong.  I will
> explain...this is how the splitters usually work
>
> from("seda:decompressFiles").routeId("DecompressFiles")
>    .split(body().tokenize(",")).streaming().shareUnitOfWork()
>        .log("LET'S SEE WHERE THIS GOES!!!")
>            .to("file:data/out?fileName=${header.zipFileName}")
>
> .to("log:?showExchangeId=true&showHeaders=true&showProperties=true&multiline=true")
>     .end()
>     .log("ORIGINAL FILE")
>
> .to("log:?showExchangeId=true&showHeaders=true&showProperties=true&multiline=true")
>
> feeding that route with this code:
> template.sendBodyAndHeaders("seda:decompressFiles", "One,Two", headers);
>
> You would get:
> [ad #0 - seda://decompressFiles] DecompressFiles                INFO  LET'S
> SEE WHERE THIS GOES!!!
> [ad #0 - seda://decompressFiles] DecompressFiles                INFO  LET'S
> SEE WHERE THIS GOES!!!
> [ad #0 - seda://decompressFiles] DecompressFiles                INFO
> ORIGINAL FILE
>
> I removed the exchange print out, but you get the idea.  Now, when using the
> zip splitter, it will work fine when you are sending the entries to a file;
> however, when you send the entries to a SEDA or something that does not
> immediately read the data from the stream then it does not work properly and
> you get an extra entry with the CamelZipComplete = true with a null body.
>
> So this is an issue with the ZipSplitter Specifically.
>
> Now, I can change the JIRA accordingly to explain the issue better; however,
> wanted to ask first since I don't know if you want to keep the original
> description or something.  I would like to basically edit the subject and
> the description to explain this correctly.
> Also, we are looking into improving the ZipSplitter to behave better since
> we ended up going deeper into this and have a better picture of what is
> going on.
>
> Please let me know your thoughts.
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Issue-when-using-ZipSplitter-and-sending-entries-to-a-file-endpoint-tp5738179p5738242.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to