Skip to content

Commit a0a724d

Browse files
authored
clarify typical outbox usage (#2043)
The outbox is typically used in combination with an existing service (messaging, audit log, CAP service). Currently, this can be misunderstood, leading to an implementation manually submitting messages to a custom outbox.
1 parent fb32a84 commit a0a724d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

java/outbox.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ status: released
1818
Usually the emit of messages should be delayed until the main transaction succeeded, otherwise recipients also receive messages in case of a rollback.
1919
To solve this problem, a transactional outbox can be used to defer the emit of messages until the success of the current transaction.
2020

21+
The outbox is typically not used directly, but rather through the [messaging service](../java/messaging), the [AuditLog service](../java/auditlog) or to [outbox CAP service events](#outboxing-cap-service-events).
22+
2123
## In-Memory Outbox (Default) { #in-memory}
2224

2325
The in-memory outbox is used per default and the messages are emitted when the current transaction is successful. Until then, messages are kept in memory.
@@ -59,8 +61,8 @@ Alternatively, you can add `using from '@sap/cds/srv/outbox';` to your base mode
5961

6062
If enabled, CAP Java provides two persistent outbox services by default:
6163

62-
- `DefaultOutboxOrdered` - is used by default by messaging services
63-
- `DefaultOutboxUnordered` - is used by default by the AuditLog service
64+
- `DefaultOutboxOrdered` - is used by default by [messaging services](../java/messaging)
65+
- `DefaultOutboxUnordered` - is used by default by the [AuditLog service](../java/auditlog)
6466

6567
The default configuration for both outboxes can be overridden using the `cds.outbox.services` section, for example in the _application.yaml_:
6668
::: code-group

0 commit comments

Comments
 (0)