You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: nservicebus/transactional-session/index.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,11 +77,11 @@ The transactional session feature requires a supported persistence package to st
77
77
78
78
## Design considerations
79
79
80
-
It's recommended to not mix the processing of control messages with business messages in order to get:
80
+
It's recommended to not mix the processing of dispatch messages with business messages in order to get:
81
81
82
-
- Predictable control message dispatch: Processing of control messages will be more reliable since there is no risk of getting delayed behind slow business messages
83
-
- More accurate metrics: Metrics like critical time and queue length will accurately represent the performance of the control message processing and not be skewed by business messages
84
-
- Simplified management: Knowing that the endpoint only processes control messages makes it possible to always retry all failed messages related to the endpoint via tools like ServicePulse
82
+
- Predictable dispatch message dispatch: Processing of dispatch messages will be more reliable since there is no risk of getting delayed behind slow business messages
83
+
- More accurate metrics: Metrics like critical time and queue length will accurately represent the performance of the dispatch message processing and not be skewed by business messages
84
+
- Simplified management: Knowing that the endpoint only processes dispatch messages makes it possible to always retry all failed messages related to the endpoint via tools like ServicePulse
85
85
86
86
When configuring endpoints for usage measurement in ServicePulse, mark dedicated transactional session processor endpoints with the appropriate [endpoint type indicator](/servicepulse/usage.md#setting-an-endpoint-type-endpoint-type-indicators).
87
87
@@ -162,7 +162,7 @@ Internally, the transactional session doesn't use a single transaction that span
162
162
6. Transport operations are captured by the `PendingTransportOperations`
163
163
7. The user can store any data using the persistence-specific session, which is accessible through the transactional session.
164
164
8. When all operations are registered, the user calls `Commit` on the transactional session.
165
-
9. A control message to complete the transaction is dispatched. The control message is independent of the message operations and is not stored in the outbox record.
165
+
9. A dispatch message to complete the transaction is sent. The dispatch message is independent of the message operations and is not stored in the outbox record.
166
166
10. The message operations are converted into an outbox record.
167
167
11. The outbox record is returned to the transactional session
168
168
12. The outbox record is saved to the storage seam.
@@ -173,39 +173,39 @@ Internally, the transactional session doesn't use a single transaction that span
173
173
174
174
### Phase 2
175
175
176
-
The control message is processed as follows:
176
+
The dispatch message is processed as follows:
177
177
178
178
* Find the outbox record.
179
179
* If it exists, and it hasn't been marked as dispatched, and there are pending operations:
180
180
* Dispatched the messages, and the outbox record is set as dispatched.
181
-
* If it doesn't exist yet, delay the processing of the control message.
181
+
* If it doesn't exist yet, delay the processing of the dispatch message.
182
182
183
183
## Failure scenarios
184
184
185
-
The transactional session provides atomic store-and-send guarantees, similar to the outbox feature (except for incoming message de-duplication). The control message is used to ensure that **exactly one** of the following outcomes occurs:
185
+
The transactional session provides atomic store-and-send guarantees, similar to the outbox feature (except for incoming message de-duplication). The dispatch message is used to ensure that **exactly one** of the following outcomes occurs:
186
186
187
187
* Transaction finishes with data being stored, and outgoing messages eventually sent - when the `Commit` path successfully stores the `OutboxRecord`
188
-
* Transaction finishes with no visible side effects - when the control message stores the `OutboxRecord`
188
+
* Transaction finishes with no visible side effects - when the dispatch message stores the `OutboxRecord`
189
189
190
-
Sending the control message first ensures that, eventually, the transaction will have an atomic outcome. If the `Commit` of the `OutboxRecord` succeeds, the control message will ensure the outgoing operations are sent.
190
+
Sending the dispatch message first ensures that, eventually, the transaction will have an atomic outcome. If the `Commit` of the `OutboxRecord` succeeds, the dispatch message will ensure the outgoing operations are sent.
191
191
192
-
### Failure to dispatch the control message
192
+
### Failure to send the dispatch message
193
193
194
-
If dispatching the control message fails, the transactional session changes will roll back, and an error will be raised to the user committing the session.
194
+
If sending the dispatch message fails, the transactional session changes will roll back, and an error will be raised to the user committing the session.
195
195
196
-
If the transaction completes and the control message fails to process through all the retry attempts, the control message will be moved to the error queue and the outgoing messages will not be dispatched. Once the error is resolved, the control message must be manually retried in ServicePulse to ensure the outgoing messages are dispatched. If the messages are not manually retried, the stored outgoing messages will never be delivered. If that's undesirable, the system must be returned to a consistent state via other means.
196
+
If the transaction completes and the dispatch message fails to process through all the retry attempts, the dispatch message will be moved to the error queue and the outgoing messages will not be dispatched. Once the error is resolved, the dispatch message must be manually retried in ServicePulse to ensure the outgoing messages are dispatched. If the messages are not manually retried, the stored outgoing messages will never be delivered. If that's undesirable, the system must be returned to a consistent state via other means.
197
197
198
198
### Failure to commit the outbox record
199
199
200
-
If the `Commit` fails, the control message will (after the [maximum commit duration](#advanced-configuration-maximum-commit-duration) elapses) eventually be consumed, leaving no side effects.
200
+
If the `Commit` fails, the dispatch message will (after the [maximum commit duration](#advanced-configuration-maximum-commit-duration) elapses) eventually be consumed, leaving no side effects.
201
201
202
202
### Commit takes too long
203
203
204
-
When the commit takes longer than the [maximum commit duration](#advanced-configuration-maximum-commit-duration), the control message will result in a tombstone record in the outbox preventing the commit from succeeding. The following exception is thrown:
204
+
When the commit takes longer than the [maximum commit duration](#advanced-configuration-maximum-commit-duration), the dispatch message will result in a tombstone record in the outbox preventing the commit from succeeding. The following exception is thrown:
205
205
206
206
`Failed to commit the transactional session. This might happen if the maximum commit duration is exceeded`
207
207
208
-
A variation of this is when using a remote processing endpoint that does not have the transactional session enabled. In this scenario, the tombstone record will be created immediately when the control message is processed, forcing a rollback of the commit. When this happens, the following exception is thrown:
208
+
A variation of this is when using a remote processing endpoint that does not have the transactional session enabled. In this scenario, the tombstone record will be created immediately when the dispatch message is processed, forcing a rollback of the commit. When this happens, the following exception is thrown:
209
209
210
210
`Failed to commit the transactional session. This might happen if the maximum commit duration is exceeded or if the transactional session has not been enabled on the configured processor endpoint - MyProcessorEndpoint`
211
211
@@ -223,9 +223,9 @@ The default value for the maximum commit duration is `TimeSpan.FromSeconds(15)`.
The maximum commit duration does not represent the total transaction time, but rather the time it takes to complete the commit operation (as observed from the perspective of the control message). In practice, the observed total commit time might be longer due to delays in the transport caused by latency, delayed delivery, load on the input queue, endpoint concurrency limits, and more.
226
+
The maximum commit duration does not represent the total transaction time, but rather the time it takes to complete the commit operation (as observed from the perspective of the dispatch message). In practice, the observed total commit time might be longer due to delays in the transport caused by latency, delayed delivery, load on the input queue, endpoint concurrency limits, and more.
227
227
228
-
When the control message is consumed, but the outbox record is not yet available in storage, the following formula is applied to delay the message (see [Phase 2](#how-it-works-phase-2)):
228
+
When the dispatch message is consumed, but the outbox record is not yet available in storage, the following formula is applied to delay the message (see [Phase 2](#how-it-works-phase-2)):
229
229
230
230
```csharp
231
231
CommitDelayIncrement=2*CommitDelayIncrement;
@@ -239,6 +239,6 @@ partial: config
239
239
240
240
### Metadata
241
241
242
-
It is possible to add metadata (e.g. tenant information) transactional session control message via custom headers. These headers can be accessed by a [custom behavior](/nservicebus/pipeline/manipulate-with-behaviors.md#add-a-new-step) when the control message is received in the `TransportReceive` part of the pipeline.
242
+
It is possible to add metadata (e.g. tenant information) transactional session dispatch message via custom headers. These headers can be accessed by a [custom behavior](/nservicebus/pipeline/manipulate-with-behaviors.md#add-a-new-step) when the dispatch message is received in the `TransportReceive` part of the pipeline.
Copy file name to clipboardExpand all lines: nservicebus/transactional-session/index_remote-processor_transactionalsession_[3.3,).partial.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,8 @@ The processor endpoint [must have both the outbox and the transactional session
17
17
18
18
Using the transactional session in send-only endpoints has the following benefits:
19
19
20
-
- Simplified management: For short-lived endpoints, there is no longer a need to make sure that all control messages have been processed before decommissioning them
21
-
- Targeted scaling: Scaling can be tailored with only the load of control messages in mind since the incoming load to store the records are handled by the endpoint using the processor.
20
+
- Simplified management: For short-lived endpoints, there is no longer a need to make sure that all dispatch messages have been processed before decommissioning them
21
+
- Targeted scaling: Scaling can be tailored with only the load of dispatch messages in mind since the incoming load to store the records are handled by the endpoint using the processor.
0 commit comments