Пример #1
0
        public Task <bool> RegisterConsumeAsync <TModel>(Action <TModel> onConsumedCallback, string rountingKey, bool requeue, ushort balance)
        {
            try
            {
                return(SimpleConsumer.GetInstance().RegisterAsync(
                           onConsumedCallback: onConsumedCallback,
                           queueName: rountingKey,
                           requeue: requeue,
                           balanceCount: balance));
            }
            catch (Exception ex)
            {
                logger.LogE(ex);
#if DEBUG
                throw;
#else
                return(Task.FromResult(false));
#endif
            }
        }
Пример #2
0
 public bool UnregisterConsume <TModel>(string rountingKey)
 {
     return(SimpleConsumer.GetInstance().Unregister <TModel>(rountingKey));
 }
Пример #3
0
 public void UnregisterAll()
 {
     SimpleConsumer.GetInstance().UnregisterAll();
 }