I'm using Booksleeve 1.1.0.6 (the latest nuget package).
I want so use a single connection for my whole Web Application so I'm storing it in a singleton:
public static RedisConnection Conn = RedisConfig.GetUnsecuredConnection(waitForOpen: true);
The RedisConfig.GetUnsecuredConnection method is the same as used in BookSleeve tests.
When I try to do an operation I get an InvalidOperationException: The queue is closed exception:
[InvalidOperationException: The queue is closed] BookSleeve.MessageQueue.Enqueue(RedisMessage item, Boolean highPri) in C:\Dev\BookSleeve\BookSleeve\MessageQueue.cs:73 BookSleeve.RedisConnectionBase.ExecuteVoid(RedisMessage message, Boolean queueJump) in C:\Dev\BookSleeve\BookSleeve\RedisConnectionBase.cs:794 ASP.welisten_booksleevetests_aspx.SaveDictionaryToRedis(Dictionary`2 dictionary) +173 ASP.welisten_booksleevetests_aspx.Page_Load(Object sender, EventArgs e) +67 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064
I tried this with the waitForOpen parameter set to true and false
Here is the code I'm trying to execute:
private void SaveDictionaryToRedis(Dictionary<string, string> dictionary)
{
using (Mp.Step("Saving Data to Redis"))
{
using (RedisConfig.Conn)
{
RedisConfig.Conn.Strings.Set(DB, dictionary);
}
}
}