protected override async Task WarmUp() { var database = _databaseFunc(); _retry.Do(() => database.SetAdd(_subscription.TopicSubscribersRedisKey, _subscription.SubscriptionMessagesRedisKey)); await base.WarmUp(); }
public Task <TopicClient> CreateTopicSender(string topicPath) { return(Task.Run(() => { EnsureTopicExists(topicPath); return _retry.Do(() => { var topicClient = _messagingFactory().CreateTopicClient(topicPath); return topicClient; }, "Creating topic sender for " + topicPath); }).ConfigureAwaitFalse()); }
public Task <ITopicClient> CreateTopicSender(string topicPath) { return(Task.Run(() => { EnsureTopicExists(topicPath); return _retry.Do(() => { var topicClient = _connectionManager.CreateTopicClient(topicPath); return topicClient; }, "Creating topic sender for " + topicPath); }).ConfigureAwaitFalse()); }
/// <summary> /// Method Name : TrySendMail /// Author : Ranjana Singh /// Creation Date : 04 Jan 2018 /// Purpose : Send mail /// Revision : /// </summary> /// <param name="numberOfTimeToTry"></param> /// <returns></returns> public bool TrySendMail(int numberOfTimeToTry = 1) { return(retry.Do(() => smtpClientFactory.Send(emailMessage), TimeSpan.FromSeconds(5), numberOfTimeToTry)); }