nodefluent / node-sinek

:tophat: Most advanced high level Node.js Kafka client
MIT License
290 stars 52 forks source link

Ability to use custom revival in JSON parse #110

Closed darky closed 5 years ago

darky commented 5 years ago

For example here: https://github.com/nodefluent/node-sinek/blob/10296469e7eca9f5e4b801e23b7e3b0ee9c9587e/lib/librdkafka/NConsumer.js#L448 need to use custom revival for custom json parsing

krystianity commented 5 years ago

you can simply tell sinek to not parse the values to json by passing false for the toJSON argument. consume(syncEvent = null, asString = true, asJSON = false, options = {})

krystianity commented 5 years ago

this way you will be able to handle the parsing of messages yourself

darky commented 5 years ago

Ok, thanks :+1: