2010-02-20 19:23:32 +01:00
|
|
|
# MongoDB Persistence
|
|
|
|
|
|
|
|
This service allows you to persist state updates using the MongoDB database.
|
|
|
|
It supports writing information to a MongoDB document store, as well as querying from it.
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
This service can be configured in the file `services/mongodb.cfg`.
|
|
|
|
|
|
|
|
| Property | Default | Required | Description |
|
|
|
|
| ---------- | ------- | :------: | ---------------------------------------------------------------------------- |
|
|
|
|
| url | | Yes | connection URL to address MongoDB. For example, `mongodb://localhost:27017` |
|
|
|
|
| database | | Yes | database name |
|
2021-03-13 19:48:19 +01:00
|
|
|
| collection | | Yes | set collection to "" if it shall generate a collection per item |
|
2010-02-20 19:23:32 +01:00
|
|
|
|
2021-03-13 19:48:19 +01:00
|
|
|
If you have a username and password it looks like this: url = mongodb://[username]:[password]@[localhost]:27017/[database]
|
2021-04-24 20:39:51 +02:00
|
|
|
The database is required: https://mongodb.github.io/mongo-java-driver/3.9/javadoc/com/mongodb/MongoClientURI.html
|
2021-03-13 19:48:19 +01:00
|
|
|
|
2021-04-14 15:11:31 +02:00
|
|
|
All item and event related configuration is done in the file `persistence/mongodb.persist`.
|