0

Recently I was debugging an application and found out my Apache camel consumer is picking two message at a time and processing them. I debugged and found out that apache camel is creating two threads even though it is specified to have one thread only - thread(1,1) as while creating routes. I think one thread is getting created for CamelConext (default) and one thread for route(Only one route is there). Is there any way to disable default thread? My end goal is to configure a consumer to pick and process one message from AWS SQS at a time.

I updated the CamelContext defaultTHread min/max thread pool to 1. It didnt work.

1 Answers1

0

Not sure if you've already tried this, but according to the documentation (https://camel.apache.org/components/3.20.x/aws2-sqs-component.html) you can define the "maxMessagesPerPoll" as option on your consumer. This sets the maximum messages per poll and thus how many messages will be handled at a time.