wattgo/node-kafka0.8 — pull request #2 by rylanhalteman (2014-02-24 14:34:44+00:00)
Title: Allow getting of non-existing offset in redis

When attempting to get a key which doesn't exist, redis returns (nil). When parseInt tries to turn this into a number, it returns NaN. This makes the consumer try to get new messages from the offset NaN, which doesn't work.

Assume that the default behaviour of getting a non-existing index is starting a consumer for the first time. Then, if parseInt returns NaN, then make the offset 0, to start consumer from beginning.