diff --git a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs index 504fc21fcfb..4bd159f0076 100644 --- a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs +++ b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs @@ -263,7 +263,10 @@ async Task SendMessagesPump() { // Tag the message with the priority that we're currently // processing, so it can be used by metrics later - messages.Select(m => m.ProcessedPriority = priority); + foreach (IMessage msg in messages) + { + msg.ProcessedPriority = priority; + } Events.ProcessingMessages(this, messages, priority); await this.ProcessMessages(messages, fsm);