Share via


MessageProcessor.BeginProcessingMessageAsync Method

Definition

Overloads

BeginProcessingMessageAsync(Message, CancellationToken)
BeginProcessingMessageAsync(ServiceBusMessageActions, ServiceBusReceivedMessage, CancellationToken)

This method is called when there is a new message to process, before the job function is invoked. This allows any preprocessing to take place on the message before processing begins.

BeginProcessingMessageAsync(Message, CancellationToken)

Source:
MessageProcessor.cs
public virtual System.Threading.Tasks.Task<bool> BeginProcessingMessageAsync (Microsoft.Azure.ServiceBus.Message message, System.Threading.CancellationToken cancellationToken);
abstract member BeginProcessingMessageAsync : Microsoft.Azure.ServiceBus.Message * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.BeginProcessingMessageAsync : Microsoft.Azure.ServiceBus.Message * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function BeginProcessingMessageAsync (message As Message, cancellationToken As CancellationToken) As Task(Of Boolean)

Parameters

message
Message
cancellationToken
CancellationToken

Returns

Applies to

BeginProcessingMessageAsync(ServiceBusMessageActions, ServiceBusReceivedMessage, CancellationToken)

Source:
MessageProcessor.cs

This method is called when there is a new message to process, before the job function is invoked. This allows any preprocessing to take place on the message before processing begins.

protected internal virtual System.Threading.Tasks.Task<bool> BeginProcessingMessageAsync (Microsoft.Azure.WebJobs.ServiceBus.ServiceBusMessageActions actions, Azure.Messaging.ServiceBus.ServiceBusReceivedMessage message, System.Threading.CancellationToken cancellationToken);
abstract member BeginProcessingMessageAsync : Microsoft.Azure.WebJobs.ServiceBus.ServiceBusMessageActions * Azure.Messaging.ServiceBus.ServiceBusReceivedMessage * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.BeginProcessingMessageAsync : Microsoft.Azure.WebJobs.ServiceBus.ServiceBusMessageActions * Azure.Messaging.ServiceBus.ServiceBusReceivedMessage * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Protected Friend Overridable Function BeginProcessingMessageAsync (actions As ServiceBusMessageActions, message As ServiceBusReceivedMessage, cancellationToken As CancellationToken) As Task(Of Boolean)

Parameters

actions
ServiceBusMessageActions

The set of actions that can be performed on a ServiceBusReceivedMessage.

cancellationToken
CancellationToken

A cancellation token that will be cancelled when the processor is shutting down.

Returns

A Task that returns true if the message processing should continue, false otherwise.

Applies to