Skip to content

Commit 151e066

Browse files
Gerard Klijsgklijs
authored andcommitted
Adding example config for mongo auto configure.
1 parent 2159f99 commit 151e066

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

extensions/mongo.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,25 @@ This extension can be added as a Spring Boot starter dependency to your project
6969

7070
It's also possible to autoconfigure the `StorageStrategy` and `EventStorageEngine` by setting the `mongo.event-store.enabled` to true. The creation of the token store and the saga store can be turned off by setting `mongo.token-store.enabled` or `mongo.saga-store.enabled` to false. It's also possible to use a different database for the axon collections than the default the `MongoDatabaseFactory` uses by setting the `axon.mongo.database-name` property.
7171

72+
The relevant configuration could look like this:
73+
74+
```yaml
75+
spring:
76+
data:
77+
mongodb:
78+
uri: mongodb://localhost:27017/test
79+
mongo:
80+
database-name: axon
81+
token-store:
82+
enabled: true
83+
saga-store:
84+
enabled: false
85+
event-store:
86+
enabled: false
87+
```
88+
89+
While `test` is the default database name, for the axon collections the `axon` database will be used instead. The saga store will not be initialised.
90+
7291
## Configuration of the Mongo Dead-Letter Queue with Spring
7392

7493
See [Dead-Letter Queue](../axon-framework/events/event-processors/README.md#dead-letter-queue) for the general information about the Dead-Letter Queue.

0 commit comments

Comments
 (0)