Camel Kinesis ignoring maxResultsPerRequest parameter

78 Views Asked by At

Camel/Kinesis seems to be ignoring maxResultsPerRequest and greedy parameters that I have set in the uri.

<camelContext xmlns="http://camel.apache.org/schema/blueprint" >
    <route>
        <from uri="aws-kinesis://my-stream?maxResultsPerRequest=25&greedy=true"/>
        <to uri="stream:out"/>
    </route>
</camelContext>

Since there are a bunch of messages waiting to be consumed in the shard, I would expect it to read the first 25 all at once, see that there are more, and then immediately poll to get the next 25.

But instead, it still reads them one at a time, at a rate of what looks like one every half a second (which lines up with the default polling delay of 500ms specified in the documentation). Adjusting the delay parameter to be shorter also seems to do nothing.

So it seems to be ignoring both the maxPerRequest as well as the greedy flag.

maxResultsPerRequest: Maximum number of records that will be fetched in each poll (int, default 1)

greedy: If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. (boolean, default false)

delay: Milliseconds before the next poll (long, default 500)

Am I misunderstanding what these parameters do?

0

There are 0 best solutions below