Configuration
The payment-warehouse-mongo module has the following reference.conf configuration: configuration is detailed below. You can override the values to suit your requirements.
ipf.core.payment-warehouse {
# This flag determines if indexes should be created during application startup.
# The default value is true.
create-indexes = true (1)
# If ipf.mongodb.create-indexes is specified, it will take precedence over this setting.
create-indexes = ${?ipf.mongodb.create-indexes} (2)
# Specifies the database type the application is using. This is crucial as each database requires a slightly different configuration.
# The default mode is "mongo". Available options are: "mongo" for MongoDB and "cosmosdb" for Azure CosmosDB for MongoDB.
database-mode = mongo (3)
# If ipf.mongodb.database-mode is specified, it will take precedence over this setting.
database-mode = ${?ipf.mongodb.database-mode} (4)
# PaymentEntries triggered for 'housekeeping' will be deleted after the configured time-to-live duration has elapsed.
time-to-live = 30d (5)
# The commit quorum to use when creating indexes,
# see https://www.mongodb.com/docs/manual/reference/command/createIndexes/#create-index-with-commit-quorum for more info
commit-quorum = "votingMembers" (6)
# If ipf.mongodb.commit-quorum is specified, it will take precedence over this setting.
commit-quorum = ${?ipf.mongodb.commit-quorum} (7)
}
And the following ipf.conf configuration:
spring.data.mongodb.uri = ${ipf.mongodb.url} (8)
| 1 | create-indexes is enabled by default.This will create all indexes required including the TTL index required for purging.
If indexes will be created manually (e.g. via deployment scripts), this can be disabled by setting to false. |
| 2 | ipf.mongodb.create-indexes can be used instead of the ipf.core.payment-warehouse.create-indexes property. |
| 3 | database-mode is set to 'mongo' by default.
This specifies which supported database you are using.
Set this to mongo for MongoDB or cosmosdb for Azure CosmosDB for MongoDB.
The application will create the appropriate indexes based on this property. |
| 4 | ipf.mongodb.database-mode can be used instead of the ipf.core.payment-warehouse.database-mode property. |
| 5 | time-to-live is set to 30 days by default.
This specifies the retention period of a Payment Entry document following the trigger of Housekeeping.
The duration format is any format supported by HOCON. |
| 6 | commit-quorum dictates how many replicas must acknowledge index creation before it is considered successful.
For more details, refer to creating indexes with commit quorum. |
| 7 | ipf.mongodb.commit-quorum can be used instead of the ipf.core.payment-warehouse.commit-quorum property. |
| 8 | The URI of MongoDB.
By default, this inherits from ipf.mongodb.url. |