private void RelayMessagesInternal(CloudQueue sourceQueue, IList<CloudQueueMessage> inboundMessages)
{
if (inboundMessages.IsNullOrEmpty())
return;
if (this.DestinationQueues.IsNullOrEmpty())
throw new Exception("Cannot relay queue messages because destination queue(s) are not specified.");
this.LogInformation("Received {0} messages from queue \"{1}\". Dispatching them to {2} destination queues.", inboundMessages.Count, sourceQueue.Name, this.DestinationQueues.Count);
//messages.ForEach(msg => this.LogInformation("Received message at {0}:\r\n\"{1}\"\r\n", DateTimeOffset.Now, msg.AsString));
var stopWatch = new Stopwatch();
stopWatch.Start();
inboundMessages = this.TransformInboundMessages(inboundMessages, stopWatch);
this.ForwardMessages(inboundMessages.Count, inboundMessages, stopWatch);
this.DeleteSourceMessages(sourceQueue, inboundMessages, stopWatch);
}