Skip to content

Key prefixing with blpop returns prefixed key #325

Closed
@Tomino2112

Description

@Tomino2112

When you use the keyPrefix option you should be getting back the "un-prefixed" version of the key when using multiple keys in blpop.

Example:

redis = new Redis({keyPrefix: "test:"})

var actionOneKey = "case:1",
    actionTwoKey = "case:2";

redis.blpop([actionOneKey, actionTwoKey], 0, function(err, msg){
    console.log(msg[0]); // Is "test:case:1", but really should be "case:1"

    // Fails
    if (msg[0] === actionOneKey){}
});

redis.lpush("test:case:1", "Hello World");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions