Skip to content

Commit

Permalink
Legacy Docs Review - 2024-10-21 (#6872)
Browse files Browse the repository at this point in the history
* Legacy Docs Review - 2024-10-21

* Update subscribing-to-error-notifications.md

* Update design.md

* Update assembly-scanning.md

* Update assembly-scanning.md

* Update assembly-scanning.md

* Update assembly-scanning.md
  • Loading branch information
poornimanayar authored Oct 25, 2024
1 parent 778a9b4 commit b2a284e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
20 changes: 10 additions & 10 deletions nservicebus/hosting/assembly-scanning.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Assembly scanning
summary: To enable automatic detection of various features NServiceBus scans assemblies for well known types
reviewed: 2022-02-15
summary: To enable the automatic detection of various features, NServiceBus scans assemblies for well-known types
reviewed: 2024-10-24
component: core
redirects:
- nservicebus/assembly-scanning
Expand All @@ -11,28 +11,28 @@ NServiceBus scans assemblies at endpoint startup to automatically detect and loa

There are some cases where finer control over which assemblies are loaded is required:

* To limit the number of assemblies being scanned and hence provide improvements to startup time.
* If hosting multiple endpoints out of the same directory each endpoint may require a subset of assemblies to be loaded.
* To limit the number of assemblies being scanned and hence improve startup time.
* If hosting multiple endpoints out of the same directory, each endpoint may require loading a subset of assemblies.

> [!NOTE]
> NServiceBus extensions such as `NServiceBus.RavenDB.dll` are not considered a core assembly but still must be included when customizing the assembly scanning.
## AppDomain assemblies

By default, the assemblies that are already loaded into the AppDomain are scanned. The endpoint can also be configured to disable AppDomain assembly scanning:
By default, the assemblies already loaded into the AppDomain are scanned. The endpoint can also be configured to disable AppDomain assembly scanning:

snippet: ScanningApDomainAssemblies

## Assembly files

By default all assemblies in the endpoint's `bin` directory are scanned in search of related interfaces so that the endpoint can configure them automatically.
By default, all assemblies in the endpoint's `bin` directory are scanned for related interfaces so that the endpoint can configure them automatically.

### Additional assembly scanning path

> [!NOTE]
> This configuration option is available only in NServiceBus version 7.4 and above.
Assembly scanning can be configured to scan an additional path for assemblies located outside of the default scanning path.
Assembly scanning can be configured to scan an additional path for assemblies outside the default scanning path.

snippet: AdditionalAssemblyScanningPath

Expand All @@ -53,7 +53,7 @@ snippet: disable-file-scanning
## Assemblies to scan

The assemblies being scanned can be further controlled via user-defined exclusions. This supports common scenarios removing specific assemblies from scanning without the risk of accidentally excluding required assemblies.
The assemblies being scanned can further be controlled via user-defined exclusions. This supports common scenarios removing specific assemblies from scanning without the risk of accidentally excluding required assemblies.

### Exclude specific assemblies by name

Expand All @@ -74,9 +74,9 @@ snippet: ScanningExcludeTypes
> [!NOTE]
> This configuration option is only available in NServiceBus 6.2 and above.
By default, exceptions occurred during assembly scanning will be re-thrown. Those exceptions can be ignored using the following:
By default, exceptions that occurred during assembly scanning will be re-thrown. Those exceptions can be ignored using the following:

snippet: SwallowScanningExceptions

> [!WARNING]
> Ignoring assembly scanning exceptions can cause the endpoint to not load some features, behaviors, messages or message handlers and cause incorrect behavior.
> Ignoring assembly scanning exceptions can cause the endpoint not to load some features, behaviors, messages or message handlers and cause incorrect behavior.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Error notifications
summary: Subscribing to error notifications
reviewed: 2022-02-09
reviewed: 2024-10-24
component: Core
versions: '[5.0,)'
redirects:
Expand All @@ -16,9 +16,9 @@ Error notifications are available for several events:

* When an [immediate retry](/nservicebus/recoverability/#immediate-retries) occurs.
* When a [delayed retry](/nservicebus/recoverability/#delayed-retries) occurs.
* When a message fails all retries and is forwarded to the error queue.
* When a message fails, all retries fail, and the message is forwarded to the error queue.

The following example shows how to be notified every time a message is handled by [recoverability](/nservicebus/recoverability/). While this code writes to the console any other action could be taken, for example sending an email or writing to a monitoring system.
The following example shows how to be notified every time a message is handled by [recoverability](/nservicebus/recoverability/). While this code writes to the console, any other action could be taken, for example, sending an email or writing to a monitoring system.

snippet: SubscribeToErrorsNotifications

Expand Down
10 changes: 5 additions & 5 deletions servicecontrol/import-failed-messages.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Re-processing messages that failed to be imported
summary: How to attempt to re-process messages that failed to be imported
reviewed: 2022-01-26
reviewed: 2024-10-24
redirects:
- servicecontrol/import-failed-audit-messages
- servicecontrol/import-failed-audits
Expand All @@ -15,7 +15,7 @@ Messages can fail to be imported into the ServiceControl database for the follow
* [Forwarding](/servicecontrol/errorlog-auditlog-behavior.md) is enabled, and the destination queue does not exist, or ServiceControl cannot send messages to it. This could happen when the message or size limit has been reached or storage resources are exhausted.

> [!NOTE]
> Messages that have corrupt (i.e. unreadable, not deserializable) header data will not be processed at all and will move to ServiceControl's 'error' queue.
> Messages with corrupt (i.e. unreadable, not deserializable) header data will not be processed and will move to ServiceControl's 'error' queue.
Messages that fail to be imported are stored in the ServiceControl database in the `FailedAuditImports` and `FailedErrorImports` collections.

Expand All @@ -30,7 +30,7 @@ When a failed import is detected in the ServiceControl database, the [**Message
To reimport the failed messages, the instance must be shut down and started from a command line using one of the following commands:

> [!NOTE]
> The value to use for `--serviceName` is the instance name. It is available in the Windows Service information as well as the ServiceControl Management Utility.
> The value to use for `--serviceName` is the instance name. It is available in the Windows Service information and ServiceControl Management Utility.
**ServiceControl instance:**

Expand All @@ -48,10 +48,10 @@ ServiceControl.Audit.exe --serviceName=Particular.Servicecontrol.Audit --import-

While in import mode, ServiceControl or ServiceControl Audit will not process its input queues. Once the message is re-processed successfully, it is available in ServicePulse and ServiceInsight. ServiceControl or ServiceControl Audit instance can then be started again.

The custom check will no longer be displayed if all failed imports have been successfully reimported
The custom check will no longer be displayed if all failed imports have been successfully reimported.

## Modify message data

If the message still fails to import it usually means that the message is malformed, and ServiceControl won't be able to ingest it. It may be possible to correct the message data manually to allow ServiceControl to import the message. To review the malformed messages, start ServiceControl in [maintenance mode](/servicecontrol/ravendb/accessing-database.md#windows-deployment-maintenance-mode) and inspect the `FailedAuditImports` or `FailedErrorImports` collection. Review the import failure logs to determine why the import continues to fail. If modifying the audit message, data can resolve the issue, make the necessary changes to the message document to allow ServiceControl to import the message.
If the message still fails to import, it usually means that the message is malformed, and ServiceControl won't be able to ingest it. It may be possible to correct the message data manually to allow ServiceControl to import the message. To review the malformed messages, start ServiceControl in [maintenance mode](/servicecontrol/ravendb/accessing-database.md#windows-deployment-maintenance-mode) and inspect the `FailedAuditImports` or `FailedErrorImports` collection. Review the import failure logs to determine why the import continues to fail. If modifying the audit message data can resolve the issue, make the necessary changes to the message document to allow ServiceControl to import the message.

Once the data has been modified, the message can be reimported by running ServiceControl from the command line with the `--import-failed-errors` or ServiceControl Audit with the `--import-failed-audits` option again.
14 changes: 7 additions & 7 deletions transports/sql/design.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: SQL Transport Design
summary: The design and implementation details of SQL Server Transport
reviewed: 2022-02-09
reviewed: 2024-10-24
component: SqlTransport
redirects:
- nservicebus/sqlserver/design
Expand All @@ -15,7 +15,7 @@ In SQL Server Transport each queue is represented as table inside a database. De

## Structure

The queue table consists of the following columns
The queue table consists of the following columns.

### ID

Expand All @@ -29,7 +29,7 @@ The `CorrelationId` column contains the value of `NServiceBus.CorrelationId` hea

### ReplyToAddress

The `ReplyToAddress` column contains the value of `NServiceBus.ReplyToAddress` header. This value is kept in a separate column to he maintain wire-level compatibility with [NServiceBus.SqlServer](https://www.nuget.org/packages/NServiceBus.SqlServer) transport Version 1.
The `ReplyToAddress` column contains the value of the `NServiceBus.ReplyToAddress` header. This value is kept in a separate column to maintain wire-level compatibility with [NServiceBus.SqlServer](https://www.nuget.org/packages/NServiceBus.SqlServer) transport Version 1.


### Recoverable
Expand All @@ -43,12 +43,12 @@ The `CorrelationId`, `ReplyToAddress` and `Recoverable` columns are required for

When receiving messages sent by endpoints that use later versions, the values of correlation ID and reply-to address should be read from the headers (`NServiceBus.CorrelationId` and `NServiceBus.ReplyToAddress`) instead. The value `Recoverable` can be ignored as it is always `true`/`1`.

When sending messages to endpoints that use later versions, the values of correlation ID and reply-to address columns could be set to `NULL` and the actual values are provided in the headers (`NServiceBus.CorrelationId` and `NServiceBus.ReplyToAddress`). The value `Recoverable` should always be `true`/`1`.
When sending messages to endpoints that use later versions, the values of correlation ID and reply-to address columns could be set to `NULL` with the actual values provided in the headers (`NServiceBus.CorrelationId` and `NServiceBus.ReplyToAddress`). The value `Recoverable` should always be `true`/`1`.


### Expires

The `Expires` column contains the optional date and time when the message is going to expire. An expired message is dropped by the transport. Depending on version, expired messages might be actively purged from the queue. For details see [discarding expired messages](/transports/sql/discard-expired-messages.md).
The `Expires` column contains the optional date and time when the message will expire. An expired message is dropped by the transport. Depending on version, expired messages might be actively purged from the queue. For details see [discarding expired messages](/transports/sql/discard-expired-messages.md).

partial: expired-index

Expand All @@ -69,7 +69,7 @@ partial: messageBodyString-column

The `RowVersion` column is used to define the FIFO order of the queue. It is auto-incremented by SQL Server (`identity(1,1)`). The receive message T-SQL query returns a message with the lowest value of `RowVersion` that is not locked by any other concurrent receive operation.

The clustered index of the queue table is based on the `RowVersion` column to ensure the new messages are always added at the end of the table.
The clustered index of the queue table is based on the `RowVersion` column to ensure that new messages are always added at the end of the table.


## Behavior
Expand All @@ -87,4 +87,4 @@ Messages are sent by executing an `insert` command against the queue table.
Messages are received by executing a `delete` command against the queue table. The `delete` is limited to a row with the lowest `RowVersion` not locked by other concurrent `delete`. This ensures that multiple threads within an endpoint instance and multiple instances of the same scaled-out endpoint can operate at full speed without conflicts.


partial: concurrency
partial: concurrency

0 comments on commit b2a284e

Please sign in to comment.