Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs review #6881

Merged
merged 6 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions monitoring/heartbeats/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Heartbeats
summary: Use the Heartbeat plugin to monitor the health of the endpoints
reviewed: 2022-02-28
reviewed: 2024-10-31
component: Heartbeats
isLearningPath: true
versions: 'Heartbeats:*'
Expand All @@ -14,7 +14,7 @@ redirects:
The Heartbeat plugin enables endpoint health monitoring by sending regular heartbeat messages from the endpoint to a ServiceControl instance. The ServiceControl instance keeps track of which endpoint instances are sending heartbeats and which ones are not.

> [!NOTE]
> Even if an endpoint is able to send heartbeat messages, other failures may occur within the endpoint and its host that prevent it from performing as expected. For example, the endpoint may not be able to process incoming messages, or it may be able to send messages to the ServiceControl queue but not to another queue. [Performance metrics](/monitoring/metrics/) can be used to monitor the processing of messages within an endpoint.
> Even if an endpoint can send heartbeat messages, other failures may occur within the endpoint and its host that prevent it from performing as expected. For example, the endpoint may not be able to process incoming messages, or it may be able to send messages to the ServiceControl queue but not to another queue. [Performance metrics](/monitoring/metrics/) can be used to monitor the processing of messages within an endpoint.

```mermaid
graph LR
Expand Down Expand Up @@ -43,4 +43,4 @@ To enable heartbeat monitoring in an environment:

When an endpoint starts sending heartbeat messages, the ServiceControl instance will mark the endpoint as "active". If the ServiceControl instance stops receiving heartbeat messages from an endpoint, it will mark that endpoint as "inactive".

The heartbeats plugin is only able to determine if the endpoint is running and sending heartbeat messages. For more sophisticated endpoint health checks, develop a [custom check](/monitoring/custom-checks/)
The Heartbeats plugin is only able to determine if the endpoint is running and sending heartbeat messages. For more sophisticated endpoint health checks, develop a [custom check](/monitoring/custom-checks/)
9 changes: 5 additions & 4 deletions nservicebus/messaging/sharing-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Sharing message contracts
summary: How to define and share message contracts between endpoints.
component: Core
reviewed: 2022-02-27
reviewed: 2024-10-31
related:
- nservicebus/messaging/messages-events-commands
- nservicebus/messaging/unobtrusive-mode
Expand All @@ -18,13 +18,14 @@ To minimize the amount of information and dependencies shared between endpoints,
A sender and receiver of a given message must use the same message contract. Message contracts may be shared in various ways:

* When all endpoints are located in a single solution, message contract assemblies may be directly referenced as project dependencies.
* When endpoints are located in multiple solutions, message contracts may be shared as [NuGet packages](https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package-msbuild). NuGet packages may be published on the file system or on a NuGet server. A [custom NuGet config file](https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file) may be used to configure additional NuGet package sources.
* When endpoints are located in multiple solutions, message contracts may be shared as [NuGet packages](https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package-msbuild). NuGet packages may be published on the file system or a NuGet server. A [custom NuGet config file](https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file) may be used to configure additional NuGet package sources.
* Messages contracts may be shared as C# source files.

### NServiceBus dependency

When [marker interfaces](/nservicebus/messaging/messages-events-commands.md#identifying-messages-marker-interfaces) are used to define messages, message contract projects have a dependency on the NServiceBus package. This may cause version conflicts when message contracts are updated in endpoints targeting older major versions of NServiceBus. This may be avoided by either:

* Use the [`NServiceBus.MessageInterfaces` assembly](/samples/message-assembly-sharing/) available from Version 8.2 and onwards
* Referencing the oldest used NServiceBus major version from message contracts projects. [NuGet dependency resolution](https://docs.microsoft.com/en-us/nuget/concepts/dependency-resolution) allows endpoints on newer major versions of NServiceBus to reference assemblies that target an older version of NServiceBus, but not vice versa.
* Switching to [unobtrusive mode](/nservicebus/messaging/unobtrusive-mode.md). Unobtrusive mode allows an assembly to define message contracts without a dependency on the NServiceBus package, making it easy to share message contracts with endpoints targeting multiple versions of NServiceBus and running on various frameworks and platforms.

Expand All @@ -38,15 +39,15 @@ When endpoints are updated independently from each other, it is important to tak
After updating message contracts in an endpoint:

* Other endpoints must be able to process messages sent or published by the updated endpoint.
* The updated endpoint must able to process messages sent or published by other endpoints.
* The updated endpoint must be able to process messages sent or published by other endpoints.

NServiceBus includes a message header containing the message type's fully qualified name, which includes the assembly name and version number. Therefore, for best compatibility, it is recommended to maintain a stable [*assembly version*](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/versioning#assembly-version). The version of the contracts may be stated in the [*assembly file version*](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/versioning#assembly-file-version), [*assembly informational version*](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/versioning#assembly-informational-version), or *NuGet package version*.

The [evolving message contracts guidance](/nservicebus/messaging/evolving-contracts.md) has more details on safely updating message contracts.

## Breaking down large contract assemblies

In the early stages of developing a system, combining all events, commands, and messages in a single contracts assembly is often a good way to start. As the system grows, breaking down the contracts into smaller parts makes it easier to evolve a system safely.
In the early stages of developing a system, combining all events, commands, and messages in a single contract assembly is often a good way to start. As the system grows, breaking down the contracts into smaller parts makes it easier to evolve a system safely.

For example, an endpoint may have many subscribers to its events, but only one or two endpoints sending it commands. A good way to evolve the command senders without requiring the subscribers to update their contract assemblies would be to separate the command and events into two assemblies:

Expand Down
8 changes: 4 additions & 4 deletions nservicebus/security/assembly-loading.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: Assembly loading
summary: Describes security-related aspects with assembly loading and how to further control the endpoint's behavior
summary: Describes security-related aspects with assembly loading and how to control the endpoint's behavior further
component: Core
reviewed: 2022-02-15
reviewed: 2024-10-31
related:
- nservicebus/security
- nservicebus/hosting/assembly-scanning
---

## Assembly scanning

NServiceBus relies on [assembly scanning](/nservicebus/hosting/assembly-scanning.md) to detect and load user-defined extension points into the endpoint. Depending on the assembly scanning configuration, endpoints will automatically load assemblies deployed to the configured probing paths. This behavior implies a high level of trust in assemblies being deployed along with the application and appropriate infrastructure configuration to prevent foreign access to the applications binary folders (e.g., using file system permissions and appropriate system accounts).
NServiceBus relies on [assembly scanning](/nservicebus/hosting/assembly-scanning.md) to detect and load user-defined extension points into the endpoint. Depending on the configuration, endpoints will automatically load assemblies deployed to the configured probing paths. This behavior implies a high level of trust in assemblies being deployed along with the application and appropriate infrastructure configuration to prevent foreign access to the application's binary folders (e.g., using file system permissions and appropriate system accounts).

partial: disable-scanning

Expand All @@ -21,4 +21,4 @@ Due to the various ways of defining, sharing, and deploying message contracts, a
partial: disable-type-loading

> [!NOTE]
> Loading types does not automatically create instances of the loaded type. NServiceBus prevents instantiation of types that are not considered [valid message types](/nservicebus/messaging/conventions.md).
> Loading types do not automatically create instances of the loaded type. NServiceBus prevents instantiation of types that are not considered [valid message types](/nservicebus/messaging/conventions.md).
14 changes: 5 additions & 9 deletions persistence/sql/dialect-oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@
title: Oracle dialect
component: SqlPersistence
related:
reviewed: 2022-02-18
reviewed: 2024-10-31
versions: "[2,)"
redirects:
- nservicebus/sql-persistence/oracle-caveats
- nservicebus/sql-persistence/oracle-design
---

> [!WARNING]
> SQL Persistence will run on [Oracle XE](https://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html). However it is strongly recommended to use commercial versions for any production system. It is also recommended to ensure that support agreements are in place. See [Oracle Support](https://www.oracle.com/support/index.html) for details.

> SQL Persistence will run on [Oracle XE](https://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html). However it is strongly recommended to use commercial versions for production systems. It is also recommended to ensure that [Oracle support agreements](https://www.oracle.com/support/index.html) are in place.

## Supported database versions

SQL persistence supports [Oracle 11g Release 2](https://docs.oracle.com/cd/E11882_01/readmes.112/e41331/chapter11204.htm) and above.


## Usage

Using the [Oracle.ManagedDataAccess NuGet Package](https://www.nuget.org/packages/Oracle.ManagedDataAccess).
Expand Down Expand Up @@ -52,11 +50,10 @@ snippet: OracleSchema

include: name-lengths

The SQL Persistence provides autonomy between endpoints by using separate tables for every endpoint based on the endpoint name. However, due to Oracle's 30-character limit on table names and index names in [Oracle 12.1 and below](https://docs.oracle.com/database/121/SQLRF/sql_elements008.htm#SQLRF00223), the SQL Persistence must make some compromises.
The SQL Persistence provides autonomy between endpoints by using separate tables for each endpoint based on the endpoint name. However, due to Oracle's 30-character limit on table names and index names in [Oracle 12.1 and below](https://docs.oracle.com/database/121/SQLRF/sql_elements008.htm#SQLRF00223), the SQL Persistence must make some compromises.

include: name-length-validation-on


### Table Names

> [!NOTE]
Expand All @@ -76,12 +73,11 @@ If an endpoint name is longer than 24 characters, an exception will be thrown, a

snippet: TablePrefix


### Sagas

Tables generated for sagas reserve 27 characters for the saga name, leaving 3 characters for the `_PK` suffix for the table's primary key.

In order to accommodate as many characters for the saga name as possible, the [table prefix](/persistence/sql/install.md#table-prefix) is omitted from the saga table name.
To accommodate as many characters for the saga name as possible, the [table prefix](/persistence/sql/install.md#table-prefix) is omitted from the saga table name.

| Saga Class Name | Table Name | Primary Key |
|-----------------|:-------------:|:----------------:|
Expand All @@ -98,7 +94,7 @@ where INDEX_NAME = 'SAGAIDX_525D1D4DC0C3DCD96947E1';
```

> [!NOTE]
> If saga name or correlation property name change, the name of the index will also change.
> If the saga name or correlation property name changes, the name of the index will also change.

If a saga name is longer than 27 characters, an exception will be thrown, and a [substitute table name must be specified](saga.md#table-structure-table-name).

Expand Down