I am consuming messages in batch mode. I wanted to pull 8 messages each 250 ms from stream.
spring:
cloud:
stream:
kinesis:
bindings:
input:
consumer:
listenerMode: batch
idleBetweenPolls: 250
recordsLimit: 8
bindings:
input:
group: my-group
destination: stream
content-type: application/json
I have pushed around 100 messages on to stream, and I started the consumer.
As per configuration, I am supposed to pull messages each 250 ms. But the poller not pulling messages each 250 ms.
@StreamListener(Sink.INPUT)
public void receiveMessage(Message<List<byte[]>> messages) {
log.info("Total received messages: " + messages.getPayload().size());
}
2019-04-27 12:04:40.145 : Total received messages: 8
2019-04-27 12:04:41.604 : Total received messages: 8
2019-04-27 12:04:43.167 : Total received messages: 8
2019-04-27 12:04:44.618 : Total received messages: 8
2019-04-27 12:04:46.145 : Total received messages: 8
2019-04-27 12:04:47.775 : Total received messages: 8
2019-04-27 12:04:49.211 : Total received messages: 8
2019-04-27 12:04:50.756 : Total received messages: 8
2019-04-27 12:04:52.283 : Total received messages: 8
2019-04-27 12:04:53.817 : Total received messages: 8
I am not even processing anything at all. Its just log.
The time between each messages are more than 250 ms. Am I missing anything.