Esempio n. 1
0
        private static void HandleBatch(QueueClient client)
        {
            while (true)
            {
                var messages = client.ReceiveBatch(10, TimeSpan.FromSeconds(5));
                if (messages.Any())
                {
                    foreach (var msg in messages)
                    {
                        HandleMessage(msg, false);
                    }

                    client.CompleteBatch(messages.Select(m => m.LockToken));
                }
            }
        }