Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use xread and pipeline/tx in parallel #304

Open
zifeo opened this issue Apr 27, 2022 · 1 comment
Open

Ability to use xread and pipeline/tx in parallel #304

zifeo opened this issue Apr 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@zifeo
Copy link
Contributor

zifeo commented Apr 27, 2022

This seems to only be a restriction/issue? with pipeline/tx, simple commands seem to work. Currently ends up in multiple errors: Invalid state, -ERR Protocol error: invalid multibulk length, raw.split is not a function or its return value is not iterable and similar.

const client = await newClient(opts);

// async
client.xread([{ key: "test", xid: 0 }], { block: 5000 });

const tx = client.pipeline();
tx.xadd("test", "*", {a: "a"}, { approx: true, elements: 10000 });
const resp = await tx.flush();

client.close();
@uki00a uki00a added the bug Something isn't working label May 25, 2022
@zifeo
Copy link
Contributor Author

zifeo commented May 28, 2022

Note that simple commands will be delayed and cannot happen in parallel of xread "blocks". The workaround is to use two connections and might be worth clarifying in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants