/// <summary> /// Process a new message that was received /// </summary> /// <param name="message">Message that was received</param> /// <param name="messageContext">Context providing more information concerning the processing</param> /// <param name="correlationInfo"> /// Information concerning correlation of telemetry and processes by using a variety of unique /// identifiers /// </param> /// <param name="cancellationToken">Cancellation token</param> public override async Task ProcessMessageAsync( Order message, AzureServiceBusMessageContext messageContext, MessageCorrelationInfo correlationInfo, CancellationToken cancellationToken) { await _orderMessageHandler.ProcessMessageAsync(message, messageContext, correlationInfo, cancellationToken); await CompleteMessageAsync(); }
/// <summary> /// Process a new message that was received /// </summary> /// <param name="batch">Message that was received</param> /// <param name="messageContext">Context providing more information concerning the processing</param> /// <param name="correlationInfo"> /// Information concerning correlation of telemetry and processes by using a variety of unique /// identifiers /// </param> /// <param name="cancellationToken">Cancellation token</param> public async Task ProcessMessageAsync( OrderBatch batch, AzureServiceBusMessageContext messageContext, MessageCorrelationInfo correlationInfo, CancellationToken cancellationToken) { foreach (Order order in batch.Orders) { await _messageHandler.ProcessMessageAsync(order, messageContext, correlationInfo, cancellationToken); } }