Ejemplo n.º 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
            }
        }
Ejemplo n.º 2
0
 public bool UnregisterConsume <TModel>(string rountingKey)
 {
     return(SimpleConsumer.GetInstance().Unregister <TModel>(rountingKey));
 }
Ejemplo n.º 3
0
 public void UnregisterAll()
 {
     SimpleConsumer.GetInstance().UnregisterAll();
 }