Skip to main content

Definition

Assembly: CloudNimble.SimpleMessageBus.Dispatch.Azure.dll Namespace: CloudNimble.SimpleMessageBus.Dispatch Inheritance: System.Object

Syntax

CloudNimble.SimpleMessageBus.Dispatch.AzureStorageQueueProcessor

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

public AzureStorageQueueProcessor(CloudNimble.SimpleMessageBus.Dispatch.IMessageDispatcher dispatcher, Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory)

Parameters

NameTypeDescription
dispatcherCloudNimble.SimpleMessageBus.Dispatch.IMessageDispatcherThe message dispatcher to route messages to handlers.
serviceScopeFactoryMicrosoft.Extensions.DependencyInjection.IServiceScopeFactoryThe service scope factory for creating DI scopes per message.

Exceptions

ExceptionDescription
ArgumentNullExceptionThrown when dispatcher or serviceScopeFactory is null.

.ctor Inherited

Inherited from object

Syntax

public Object()

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ProcessQueue

Processes a message from the Azure Storage Queue and dispatches it to registered handlers.

Syntax

public System.Threading.Tasks.Task<Azure.Storage.Queues.Models.QueueMessage> ProcessQueue(Azure.Storage.Queues.Models.QueueMessage queueMessage, Microsoft.Extensions.Logging.ILogger logger)

Parameters

NameTypeDescription
queueMessageAzure.Storage.Queues.Models.QueueMessageThe Azure Storage Queue message to process.
loggerMicrosoft.Extensions.Logging.ILoggerThe 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 object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?
  • CloudNimble.SimpleMessageBus.Dispatch.IQueueProcessor