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
コード例 #1
0
 public QueuedSender(AzureWebHookDequeueManager parent, ILogger logger)
     : base(logger)
 {
     if (parent == null)
     {
         throw new ArgumentNullException(nameof(parent));
     }
     _parent = parent;
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: itomek/WebHooks
        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);
        }
コード例 #3
0
 public QueuedSender(AzureWebHookDequeueManager parent, ILogger logger)
     : base(logger)
 {
     if (parent == null)
     {
         throw new ArgumentNullException("parent");
     }
     _parent = parent;
 }