ioredis icon indicating copy to clipboard operation
ioredis copied to clipboard

Read buffer instead of string with xreadgroup

Open Strauteka opened this issue 7 months ago • 0 comments

With xadd I can add string | Buffer | number; But acquire value with xreadgroup returns string(corrupted). Is there is an equivalent method to receive buffer in stream group read? Cant find one.

redis.xreadgroup(
            'GROUP',
            groupName,
            consumerName,
            'COUNT',
            count,
            'STREAMS',
            channel,
            id || '>'
        );

closest method found

   xreadBuffer(...args: [
        streamsToken: "STREAMS",
        ...args: RedisValue[],
        callback: Callback<[
            key: Buffer,
            items: [id: Buffer, fields: Buffer[]][]
        ][] | null>
    ]): Result<[
        key: Buffer,
        items: [id: Buffer, fields: Buffer[]][]
    ][] | null, Context>;

Strauteka avatar May 08 '25 07:05 Strauteka