Provides an event loop which dequeues messages from a Microsoft Azure Queue and then sends the WebHook to the recipients. If the delivery success then the message is removed from the queue, otherwise it remains so that another attempt can be made. After a given number of attempts the message is discarded without being delivered.
Inheritance: IDisposable
 public QueuedSender(AzureWebHookDequeueManager parent, ILogger logger)
     : base(logger)
 {
     if (parent == null)
     {
         throw new ArgumentNullException(nameof(parent));
     }
     _parent = parent;
 }
Example #2
0
        private static async Task DequeueAndSendWebHooks(CancellationToken cancellationToken)
        {
            // Create the dequeue manager
            string connectionString = ConfigurationManager.ConnectionStrings[QueueConnectionString].ConnectionString;
            ILogger logger = CommonServices.GetLogger();
            AzureWebHookDequeueManager manager = new AzureWebHookDequeueManager(connectionString, logger);

            // Start the dequeue manager
            await manager.Start(cancellationToken);
        }
 public QueuedSender(AzureWebHookDequeueManager parent, ILogger logger)
     : base(logger)
 {
     if (parent == null)
     {
         throw new ArgumentNullException("parent");
     }
     _parent = parent;
 }