You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Federico Mariani (Jira)" <ji...@apache.org> on 2026/04/08 14:53:00 UTC
[jira] [Resolved] (CAMEL-23281) [camel-core] split/aggregator stuck in tx
[ https://issues.apache.org/jira/browse/CAMEL-23281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Federico Mariani resolved CAMEL-23281.
--------------------------------------
Resolution: Fixed
> [camel-core] split/aggregator stuck in tx
> -----------------------------------------
>
> Key: CAMEL-23281
> URL: https://issues.apache.org/jira/browse/CAMEL-23281
> Project: Camel
> Issue Type: Bug
> Components: came-core
> Affects Versions: 4.18.1
> Reporter: Francesco Spampinato
> Assignee: Federico Mariani
> Priority: Minor
> Fix For: 4.18.2, 4.19.0
>
> Attachments: image-2026-04-02-00-55-36-946.png, threaddump-1775398792709.tdump
>
>
> Hi,
> i've a simple integration scenario.
> A csv file is polled from file system, the file is splitted and divided in chunks of certain size.
> Every chunk is persisted in bulk mode into a database, after that the file is moved into a processed folder. The entire file processing must be in transaction.
> {code:java}
> from(file("data").move("done"))
> .transacted()
> .split(body().tokenize(CSV_NEW_LINE)).streaming().stopOnException()
> .choice()
> .when(exchangeProperty(SPLIT_INDEX).isGreaterThan(0))
> .unmarshal().bindy(BindyType.Csv, CsvData.class)
> .aggregate(constant(true), AggregationStrategies.groupedBody())
> .eagerCheckCompletion()
> .executorService(new SynchronousExecutorService())
> .completionSize(BULK_SIZE)
> .completionPredicate(exchangeProperty(SPLIT_COMPLETE))
> .to(direct("saveData"));
> from(direct("saveData"))
> .log("${body}")
> .to(jpa("java.util.List").usePersist(true).flushOnSend(true)); {code}
> With version 4.18.0 everything works fine. With batch size of 5 and a csv of 11 lines, 3 batch created and persisted to db in a single database tx.
> With version 4.18.1, after the creation of first chunk the aggregator remains stuck and no progression is made
> !image-2026-04-02-00-55-36-946.png!
> The csv is not moved into processed folder and i've to kill the application.
> I've attached a threadump.
> I've created also a small repo to reproduce the issue.
> [spampibridge/split-aggregate|https://github.com/spampibridge/split-aggregate]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)