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

Stream with Block parameter #1158

Closed
hiteshpersonal opened this issue Jun 5, 2019 · 4 comments
Closed

Stream with Block parameter #1158

hiteshpersonal opened this issue Jun 5, 2019 · 4 comments

Comments

@hiteshpersonal
Copy link

How can I run XRead with block parameter with code? I am trying to replace pub/sub with the stream data type so that our clients don't lose messages. Is it intentionally not supported by the driver?

Xread BLOCK 100 STREAMS channel1 $

Thanks,
Hitesh

@mgravell
Copy link
Collaborator

mgravell commented Jun 6, 2019

This is deliberate; see this paragraph: https://stackexchange.github.io/StackExchange.Redis/PipelinesMultiplexers.html#multiplexing

We're aware that people want this option - it needs some internal work to make it supportable, however. Additional links:

#1155
#1117
#886

@veedeo
Copy link

veedeo commented Dec 8, 2020

Not sure why it was closed
this code runs in loop with empty messages

            while (!stoppingToken.IsCancellationRequested)
            {
                _logger.LogInformation("Reading Stream from Redis");
                var res = await redisDb.StreamReadAsync("events", "0-0", count: 1000);
                _logger.LogInformation("Recieved", res.FirstOrDefault().Values);
            }

@mgravell
Copy link
Collaborator

mgravell commented Dec 8, 2020

Literally everything in my previous reply is saying why it is closed.

Until we ship a pool-based, rather than multiplexed, core (or more likely: a dual core that allows you to use pool-based mechanisms), this isn't viable.

@veedeo
Copy link

veedeo commented Dec 8, 2020

Got you, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants