static void HandleConsumerOnUnsubscribe(object sender, SubscriptionEventArgs args) { Console.WriteLine("Unsubscribed from channel :" + args.GetChannel()); //redis.Publish("gameplay", "WTF"); }
static void HandleConsumerOnSubscribe(object sender, SubscriptionEventArgs args) { Console.WriteLine("Subscribed to channel : " + args.GetChannel()); redis.Publish("gameplay", "I m Awesome!!"); redis.Publish("gameplay", "I m Super Awesome!!"); //consumer.Unsubscribe(new string[] {"gameplay"}); }