stackexchange.redis

Stackexchange.redis lacks the “WAIT” support

会有一股神秘感。 提交于 2020-01-03 03:13:06
问题 i have 3 web api servers behind a load balancer which a client application is using. i am using this library to access redis cluster with one master and few slaves. the "WAIT" operation is not currently supported, and i need this functionality in order to store a newly created user session and wait until it replicates to all slaves to ensure that all following incoming calls from the client to read the session (which can come from my other application servers) won't fail (as it can try to

How to do basic WATCH with StackExchange.Redis

岁酱吖の 提交于 2020-01-02 08:08:34
问题 I would like to do a basic watch with StackExchange.Redis. Where if a key is changed during the transaction, it fails. StackExchange.Redis has abstracted this nicely to a "Condition" api, which supports concepts of "Equals" and "Exists". That's really nice, but I would like to just do something like "Unchanged". I might be missing something, but it's not obvious to me at this point on how to do that. Is it possible to do something like: var transaction = redis.CreateTransaction(); transaction

Could not connect to Redis at 10.XX.XX.28:6379: Unknown error - while accessing from Spring Batch or windows machine

白昼怎懂夜的黑 提交于 2019-12-30 11:55:28
问题 I have followed all the steps from link: https://linuxtechlab.com/how-install-redis-server-linux/ and using below linux version. uname -a Linux ech-10-XX-XX-28 2.6.32-696.13.2.el6.x86_64 #1 SMP Thu Oct 5 17:03:21 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux This is installed somewhere on cloud on virtual machine and from local windows machine I am trying to access the redis getting below error mentioned here: nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not

StackExchange.Redis Deadlocking

心已入冬 提交于 2019-12-30 08:34:13
问题 I'm using StackExchange.Redis (SE.R henceforth) in my Nancy application. There is a single global ConnectionMultiplexer that gets automatically passed around by Nancy's TinyIoC via constructor parameters, and any time I try and use GetDatabase and one of the *Async methods (sync methods only start failing after one of the async methods have been attempted) my application deadlocks. Looking at my parallel stacks it appears that I have four threads: The thread that called Result on one of my

StackExchange.Redis Deadlocking

混江龙づ霸主 提交于 2019-12-30 08:34:12
问题 I'm using StackExchange.Redis (SE.R henceforth) in my Nancy application. There is a single global ConnectionMultiplexer that gets automatically passed around by Nancy's TinyIoC via constructor parameters, and any time I try and use GetDatabase and one of the *Async methods (sync methods only start failing after one of the async methods have been attempted) my application deadlocks. Looking at my parallel stacks it appears that I have four threads: The thread that called Result on one of my

How to insert a batch of records into Redis

不打扰是莪最后的温柔 提交于 2019-12-24 03:51:06
问题 In a twitter-like application, one of the things they do is when someone posts a tweet, they iterate over all followers and create a copy of the tweet in their timeline. I need something similar. What is the best way to insert a tweet ID into say 10/100/1000 followers assuming I have a list of follower IDs. I am doing it within Azure WebJobs using Azure Redis. Each webjob is automatically created for every tweet received in the queue. So I may have around 16 simultaneous jobs running at the

How to use StackExchange.Redis ConnectionMultiplexer with SignalR.Redis (2.2)

夙愿已清 提交于 2019-12-24 03:36:22
问题 Currently SignalR.Redis is using Booksleeve. However, SignalR.Redis has now migrated to StackExchange.Redis instead of Booksleave in the signalR.Redis (2.2 Dev Branch). We can still specify a single Redis server using the same code after upgrading to 2.2: GlobalHost.DependencyResolver.UseRedis("localhost", 6379, string.Empty, "myApp"); However, I am now wondering how I can use the ConnectionMultiplexer (available in StackExchange.Redis) to specify multiple servers with SignalR.Redis (instead

Duplicate a key in redis

馋奶兔 提交于 2019-12-24 00:38:49
问题 Can I duplicate a key using the redis-cli connected, is there any command predefined in redis or not? Duplicate FSS_SYSAGENT to FSS_SYSAGENTDuplicate. 10.44.112.213:6403> hgetall FSS_SYSAGENT 1) "SYSTEM_01" 2) "{\"port\":\"4407\",\"ipAddress\":\"10.44.112.213\",\"symbolicName\":\"SYSTEM_01\",\"eventLogEnabled\":\"1110\",\"status\":1,\"wcPort\":\"6029\",\"activeSystem\":\"N\",\"createdBy\":\"\",\"createdDate\":\"2018-11-20 13:11:16\",\"modifiedBy\":\"\",\"modifiedDate\":\"\",\"institution\":\

StackExchange.Redis: Get the count of channel subscriptions (i.e. PUBSUB NUMSUB)

白昼怎懂夜的黑 提交于 2019-12-23 17:55:24
问题 is there a way to get the number of channel subscriptions to a specific Redis channel through the StackExchange.Redis library? When interacting with Redis directly, it would work with the PUBSUB NUMSUB command (http://redis.io/commands/pubsub) but I don't see an equivalent call in the C# client library. 回答1: This is a server command (as opposed to a database command), so the same guidance applies as for KEYS, SCAN, FLUSHDB, etc. Short version: use GetServer() . Longer version: read the linked

Using StackExchange.Redis client with Redis cluster

淺唱寂寞╮ 提交于 2019-12-23 14:11:11
问题 How do I tell StackExchange.Redis (v1.0.481) that it's about to connect to a Redis cluster (v3.2.6, in case it matters), and not just a standalone/replicated instance? When I use the redis-cli for example, I have to pass a -c flag to make it cluster-aware. Is there an equivalent flag in the StackExchange.Redis connection string? I've searched for and come across several examples of connection strings that include multiple comma-separated host:port parameters, but nothing that explicitly makes