How to control the concurrency of processing messages by ConsumerGroup
问题 I am using kafka-node ConsumerGroup to consume message from a topic. The ConsumerGroup when consumes a message requires calling an external API, which might even take a second to response. I wish to control consuming next message from the queue until I get the response from the API, so that the messages are processed sequentially. How should I control this behavior? 回答1: This is how we have implemented processing of 1 message at a time: var async = require('async'); //npm install async /