moscajs / ascoltatori

The pub/sub library for node backed by Redis, MongoDB, AMQP (RabbitMQ), ZeroMQ, MQTT (Mosquitto) or just plain node!
http://mcollina.github.com/ascoltatori
525 stars 122 forks source link

Make kafka consumer options configurable #162

Open svarkey opened 7 years ago

svarkey commented 7 years ago

I noticed that kafka consumer options like fromOffset,autoCommit are hard coded. It would be nice if we allow these options configurable

that._consumer = new Consumer(that._consumerClient, subscriptions, {
               groupId: groupId,fromOffset: true, autoCommit: false, encoding: "buffer"});
        }
mcollina commented 7 years ago

Good Spot!!! Can you please send a PR for this?