예제 #1
0
        public bool DeleteQueue(Address address)
        {
            using (var client = GetClient())
            {
                bool exists = client.Exists(_keyNameProvider.GetMessageIdQueueName(address)) > 0;

                using (var tran = client.CreateTransaction())
                {
                    tran.QueueCommand(c => c.Remove(_keyNameProvider.GetClaimedMessageIdListName(address)));            //LREM the messageId
                    tran.QueueCommand(c => c.Remove(_keyNameProvider.GetMessageHashName(address)));                     //LREM the messageId
                    tran.QueueCommand(c => c.Remove(_keyNameProvider.GetMessageIdQueueName(address)));                  //LREM the messageId

                    tran.Commit();
                }

                return(exists);
            }
        }
예제 #2
0
 protected string GetClaimedMessageIdListName(Address address)
 {
     return(_keyNameProvider.GetClaimedMessageIdListName(address));
     //return GetBaseQueueName(address) + ":claimed";
 }