Skip to content

Commit 02c4ca9

Browse files
Update wording.
1 parent 68800c6 commit 02c4ca9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

persistence/cosmosdb/defaultcontainer.include.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ The container that is used by default for all incoming messages is specified via
33
snippet: CosmosDBDefaultContainer
44

55
#if-version [3, )
6-
**Added in version 3.2.1:** An opt-in flag `EnableContainerFromMessageExtractor` has been introduced to enable the below behavior added in `v3.2.0` in a non-breaking way, particularily if a default container and a message container extractor is used. If this flag is not used, the default behavior will be that the message container extractor will not overwrite the default container. This flag will become redundant in `v4.0.0` resulting in the correct default behavior introduced in `v3.2.0`, and be removed in `v5.0.0`.
6+
**Added in version 3.2.1:** By default, message container extractors cannot override the configured default container. To allow extractors to override the default container, enable the `EnableContainerFromMessageExtractor` flag:
77

88
```csharp
99
config.UsePersistence<CosmosPersistence>()
1010
.EnableContainerFromMessageExtractor();
1111
```
1212

13-
**Added in version 3.2.0:** If the container information is being extracted during runtime from a message instance (header or message body), the default container specified will be overwritten by the last extractor in the pipeline. For example, if a [Header Extractor](/persistence/cosmosdb/transactions.md#specifying-the-container-to-use-for-the-transaction-using-message-header-values) (physical stage) and a [Message Extractor](/persistence/cosmosdb/transactions.md#specifying-the-container-to-use-for-the-transaction-using-the-message-contents) (logical stage) are both configured, then the container information within the Message Extractor would be used.
13+
When this flag is enabled and multiple extractors are configured, the last extractor in the pipeline determines the final container. For example, if both a [Header Extractor](/persistence/cosmosdb/transactions.md#specifying-the-container-to-use-for-the-transaction-using-message-header-values) (physical stage) and a [Message Extractor](/persistence/cosmosdb/transactions.md#specifying-the-container-to-use-for-the-transaction-using-the-message-contents) (logical stage) are configured, the Message Extractor takes precedence.
1414

1515
> [!NOTE]
16-
> **Added in version 3.2.0:** The exception to the above is if the extractor fails to pull container information from the message (logical), then the container information in the header (physical) will be used. If this also fails, the configured default container will be used as a fallback. If there is no default container configured, an exception will be thrown.
16+
> **Added in version 3.2.1:** If an extractor fails to retrieve container information, the system falls back to the next available source in this order: Message Extractor → Header Extractor → configured default container. If no default container is configured and all extractors fail, an exception is thrown.
1717
#end-if
1818

1919
When installers are enabled, this (default) container will be created if it doesn't exist. To opt-out of creating the default container, either disable the installers or use `DisableContainerCreation()`:

0 commit comments

Comments
 (0)