This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new d4272adf09d CAMEL-22181: poll/pollEnrich should support eager limit option for file based components so it can be faster out of the box. d4272adf09d is described below commit d4272adf09d4b0014f1a8ca42b969869587b99a2 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Jun 20 09:54:06 2025 +0200 CAMEL-22181: poll/pollEnrich should support eager limit option for file based components so it can be faster out of the box. --- .../java/org/apache/camel/component/file/FileConsumeTemplateTest.java | 4 ++-- docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_13.adoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeTemplateTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeTemplateTest.java index 21d1904e6d3..9265ec33a32 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeTemplateTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeTemplateTest.java @@ -33,10 +33,10 @@ public class FileConsumeTemplateTest extends ContextTestSupport { template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME, "hello.txt"); template.sendBodyAndHeader(fileUri(), "Bye World", Exchange.FILE_NAME, "bye.txt"); - Exchange out = consumer.receive(fileUri("?sortBy=file:name")); + Exchange out = consumer.receive(fileUri("?sortBy=file:name&eagerMaxMessagesPerPoll=false")); assertNotNull(out); - Exchange out2 = consumer.receive(fileUri("?sortBy=file:name")); + Exchange out2 = consumer.receive(fileUri("?sortBy=file:name&eagerMaxMessagesPerPoll=false")); assertNotNull(out2); String body = out.getIn().getBody(String.class); diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_13.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_13.adoc index 0d753ee6610..a78051592d6 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_13.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_13.adoc @@ -15,7 +15,7 @@ an empty default noop implementation in the interface. When using `poll` or `pollEnrich` with the file based components, then the `eagerLimitMaxMessagesPerPoll` option has changed default from `false` to `true`. Only use-cases where you need to sort the files first, -requires to explicit set the option `eagerLimitMaxMessagesPerPoll=false` to make Camel scan for all files first before sorting, +requires to explicit set the option `eagerMaxMessagesPerPoll=false` to make Camel scan for all files first before sorting, and then `poll` or `pollEnrich` will then pick the top file after the sorting. This improves performance for use-cases without need for sorting first.