Definition
Assembly: CloudNimble.SimpleMessageBus.Dispatch.FileSystem.dll Namespace: CloudNimble.SimpleMessageBus.Dispatch Inheritance: System.ObjectSyntax
Summary
Processes queue items stored in the local file system and dispatches them to all IMessageHandlerIMessageHandlers</see> registered with the DI container.Remarks
This processor monitors a configured file system directory for new message files and automatically processes them when they appear. It supports three-folder operation: queue (incoming), completed (successfully processed), and error (failed processing). The processor integrates with Azure WebJobs for file system monitoring and automatic triggering.Constructors
.ctor
The default constructor called by the Dependency Injection container.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
options | Microsoft.Extensions.Options.IOptions<CloudNimble.SimpleMessageBus.Core.FileSystemOptions> | The injected IOptions`1 specifying the options required to leverage the local file system as the SimpleMessageBus backing queue. |
dispatcher | CloudNimble.SimpleMessageBus.Dispatch.IMessageDispatcher | The message dispatcher to route messages to handlers. |
serviceScopeFactory | Microsoft.Extensions.DependencyInjection.IServiceScopeFactory | The Dependency Injection container’s IServiceProvider instance, so that a “per-request” scope can be created that gives each MessageEnvelope |
| its own set of isolated dependencies. |
.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 file when it appears in the queue directory.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
messageEnvelopeJson | string | The JSON content of the message envelope file. |
fileTrigger | System.IO.FileSystemEventArgs | The file system event that triggered this processing. |
logger | Microsoft.Extensions.Logging.ILogger | The logger instance for this processing operation. |
Returns
Type:System.Threading.Tasks.Task
Remarks
This method is triggered automatically by the Azure WebJobs framework when files are created or renamed in the queue directory. It deserializes the message and dispatches it to handlers.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