> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# FileSystemQueueProcessor

> Processes queue items stored in the local file system and dispatches them to all [IMessageHandler](/simplemessagebus/api-reference/CloudNimble/SimpleMessageBus/Core/IMessageH...

## Definition

**Assembly:** CloudNimble.SimpleMessageBus.Dispatch.FileSystem.dll

**Namespace:** CloudNimble.SimpleMessageBus.Dispatch

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.SimpleMessageBus.Dispatch.FileSystemQueueProcessor
```

## Summary

Processes queue items stored in the local file system and dispatches them to all [IMessageHandler](https://easyaf.nimbleapps.cloud/api-reference/CloudNimble/SimpleMessageBus/Core/IMessageHandler)IMessageHandlers\</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

### &#x20;.ctor

The default constructor called by the Dependency Injection container.

#### Syntax

```csharp theme={"dark"}
public FileSystemQueueProcessor(Microsoft.Extensions.Options.IOptions<CloudNimble.SimpleMessageBus.Core.FileSystemOptions> options, CloudNimble.SimpleMessageBus.Dispatch.IMessageDispatcher dispatcher, Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `options` | `Microsoft.Extensions.Options.IOptions<CloudNimble.SimpleMessageBus.Core.FileSystemOptions>` | The injected [IOptions\`1](https://learn.microsoft.com/dotnet/api/microsoft.extensions.options.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](https://learn.microsoft.com/dotnet/api/system.iserviceprovider) instance, so that a "per-request" scope can be created that gives each [MessageEnvelope](https://easyaf.nimbleapps.cloud/simplemessagebus/api-reference/CloudNimble/SimpleMessageBus/Core/MessageEnvelope.md) |
| its own set of isolated dependencies. | | |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ProcessQueue

Processes a message file when it appears in the queue directory.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task ProcessQueue(string messageEnvelopeJson, System.IO.FileSystemEventArgs fileTrigger, Microsoft.Extensions.Logging.ILogger logger)
```

#### 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.

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

## Related APIs

* CloudNimble.SimpleMessageBus.Dispatch.IQueueProcessor


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.