PUBLISH "{\"type\": 1, \"room\": \"1.111\"}" "{\"action\":2,\"body\":{\"test\":4444}}"
long cnt = -1; try { var chan = JsonConvert.SerializeObject(new { type = 1, room = "1.111" }); var data = JsonConvert.SerializeObject(new { action = 2, body = new { date = DateTime.Now.ToString() } }); ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(new ConfigurationOptions { AbortOnConnectFail = false, EndPoints = { "localhost" } }); if (redis.IsConnected) { var sub = redis.GetSubscriber(); cnt = sub.Publish(chan, data); } } catch (Exception ex) { //In exception, i am not getting any exception.. even getting response "1" in cnt variable.. }
catch (Exception ex) {}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)