0
client.xrevrange('TEST_STREAM','count 1',function (err,Data) {
  if (err) {
    return console.error(err);  
} else
console.log("Data from stream is:",Data);
  });

I'm trying to read the data from Redis stream and this line is giving me this error:

ERROR:" ReplyError: ERR wrong number of arguments for 'xrevrange' command"

I need help regarding this error or if there is another way to read data from Redis stream do let me know.

1 Answer 1

0

You forgot some arguments, try :

client.xrevrange('TEST_STREAM','+', '-', 'COUNT', 1,function (err,Data) { 
 if (err) {
    return console.error(err);  
} else
console.log("Data from stream is:",Data);
  });
Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.