Definition
Assembly: CloudNimble.SimpleMessageBus.Dispatch.Azure.dll Namespace: CloudNimble.SimpleMessageBus.Dispatch Inheritance: System.ObjectSyntax
Summary
Processes messages from Azure Storage Queues and dispatches them to registered message handlers.Remarks
This processor integrates with Azure WebJobs to automatically trigger message processing when messages arrive in Azure Storage Queues. It handles message deserialization, lifecycle management, and provides proper logging and dependency injection scope for each message.Constructors
.ctor
Initializes a new instance of the AzureStorageQueueProcessor class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
dispatcher | CloudNimble.SimpleMessageBus.Dispatch.IMessageDispatcher | The message dispatcher to route messages to handlers. |
serviceScopeFactory | Microsoft.Extensions.DependencyInjection.IServiceScopeFactory | The service scope factory for creating DI scopes per message. |
Exceptions
| Exception | Description |
|---|---|
ArgumentNullException | Thrown when dispatcher or serviceScopeFactory is null. |
.ctor Inherited
Inherited from
objectSyntax
Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ProcessQueue
Processes a message from the Azure Storage Queue and dispatches it to registered handlers.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
queueMessage | Azure.Storage.Queues.Models.QueueMessage | The Azure Storage Queue message to process. |
logger | Microsoft.Extensions.Logging.ILogger | The logger instance for this processing operation. |
Returns
Type:System.Threading.Tasks.Task<Azure.Storage.Queues.Models.QueueMessage>
The processed queue message, which will be moved to the completed queue if configured.
Remarks
This method is triggered automatically by the Azure WebJobs framework when messages arrive. It deserializes the message envelope, sets up processing context, and dispatches to handlers. If processing succeeds, the message is optionally moved to a completion queue.ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Related APIs
- CloudNimble.SimpleMessageBus.Dispatch.IQueueProcessor