ProcessMessageEventArgs Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The ProcessMessageEventArgs contain event args that are specific to the ServiceBusReceivedMessage that is being processed.
public class ProcessMessageEventArgs : EventArgs
type ProcessMessageEventArgs = class
inherit EventArgs
Public Class ProcessMessageEventArgs
Inherits EventArgs
- Inheritance
-
ProcessMessageEventArgs
Constructors
ProcessMessageEventArgs(ServiceBusReceivedMessage, ServiceBusReceiver, String, CancellationToken) |
Initializes a new instance of the ProcessMessageEventArgs class. |
Properties
CancellationToken |
The processor's CancellationToken instance which will be cancelled when StopProcessingAsync(CancellationToken) is called. |
EntityPath |
The path of the Service Bus entity that the message was received from. |
FullyQualifiedNamespace |
The fully qualified Service Bus namespace that the message was received from. |
Identifier |
The identifier of the processor that raised this event. |
Message |
The received message to be processed. |
Methods
AbandonMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, CancellationToken) |
Abandons a ServiceBusReceivedMessage.This will make the message available again for immediate processing as the lock on the message held by the receiver will be released. |
CompleteMessageAsync(ServiceBusReceivedMessage, CancellationToken) |
Completes a ServiceBusReceivedMessage. This will delete the message from the service. |
DeadLetterMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, CancellationToken) |
Moves a message to the dead-letter subqueue. |
DeadLetterMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, String, String, CancellationToken) |
Moves a message to the dead-letter subqueue. |
DeadLetterMessageAsync(ServiceBusReceivedMessage, String, String, CancellationToken) |
Moves a message to the dead-letter subqueue. |
DeferMessageAsync(ServiceBusReceivedMessage, IDictionary<String,Object>, CancellationToken) |
Indicates that the receiver wants to defer the processing for the message. |
GetReceiveActions() |
Gets a ProcessorReceiveActions instance which enables receiving additional messages within the scope of the current event. |
OnMessageLockLostAsync(MessageLockLostEventArgs) |
Invokes the message lock lost event handler after a message lock is lost. This method can be overridden to raise an event manually for testing purposes. |
RenewMessageLockAsync(ServiceBusReceivedMessage, CancellationToken) |
Renews the lock on the message. The lock will be renewed based on the setting specified on the queue. |
Events
MessageLockLostAsync |
An event that is raised when the message lock is lost. This event is only raised for the scope of the Process Message handler, and only for the message that is delivered to the handler - it is not raised for any additional messages received via the ProcessorReceiveActions. Once the handler returns, the event will not be raised. There are two cases in which this event can be raised: |
Applies to
Azure SDK for .NET