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