If a regular expression used in the /tokenize(...)/ method when splitting a
file payload by lines, the "group" method argument is ignored and no lines
are grouped.  For example, consider the following code to split the file
into exchanges with 100 lines per exchange. The regular expression (the
first argument) is used to ensure that any possible type of line-break is
recognized. The second argument ("true") indicates that the provided token
separator string is a regular expression. The third argument indicates that
the split lines must be grouped into exchanges with 100 lines in each.

/split().tokenize/(*"\n|\r\n|\r"*, *true*, 100)...

This results in files being split into individual lines, indeed. However,
the *grouping is completely ignored*. Always. Tested in Camel vv 2.15.2 and
2.16.0.


Is this a known issue? A bug? Is there a way to write a splitter DSL that
configures the route to correctly split a file while being /completely
agnostic of the origin of the file/ (e.g. without having to explicitly
provide one particular type of line separator character sequence that is not
a regex)??



--
View this message in context: 
http://camel.465427.n5.nabble.com/split-tokenize-w-regex-type-token-arg-and-grouping-DOESN-T-GROUP-split-items-tp5773166.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to