1.插入隊列(生産者)
private static RedisClient client = new RedisClient("127.0.0.1", 6379, null);
client.EnqueueItemOnList(listId, valuestr);
2.讀取隊列(消費者)
private static RedisClient client = new RedisClient("127.0.0.1", 6379, null);
////阻塞模式讀取
string value = client.BlockingDequeueItemFromList(listId,new TimeSpan(1));
///非阻塞模式讀取
---------------------
作者:清雨小竹
來源:CSDN
原文:https://blog.csdn.net/zzzili/article/details/77479283
版權聲明:本文為部落客原創文章,轉載請附上博文連結!