Connect RS Gateway to the Event Repository
Perform this task to configure the RS Gateway to connect to the Event Repository. The Event Repository is separate from MATRIXX Engine and is implemented in MongoDB. For information about configuring user credentials for general ledger (GL) utilities to connect to a MongoDB system, see the discussion about configuring general ledger information processing in
About this task
The Event Repository REST APIs return Event Detail Record (EDRs) and notifications in the Event Repository and in-memory event database for subscribers and groups. The connection credentials are configured in the /opt/mtx/conf/rsgateway.yaml file.
Perform this procedure on the RS Gateway host pod as user MTX. This procedure assumes that the RS Gateway is installed locally.
Procedure
-
Log in to the MongoDB hosting the Event Repository.
For example:
/var/lib/mongo/bin/mongo -u MtxAdmin -p password admin
-
Create the
MtxApp
user. Replace the value of thepwd
field with theMtxApp
password.For example:use admin db.createUser( { user: "MtxApp", pwd: "your_password", roles: [{role: "read", db: "MtxEventDatabase"}] } ) exit
Important: If special characters, such as a colon (:
) or an at-sign (@
), are used in the password when creating this MongoDB user, you must encode each special character to URL encoded format (percent encoding) when you set the password in the RS Gateway YAML file. To avoid URL encoding, use only alpha-numeric characters in MongoDB user names and passwords.For more information, see the discussion about URL encoding for special characters in MongoDB user names and passwords in MATRIXX Integration. - Access the rsgateway.yaml file located at /opt/mtx/conf/ in the files for your configuration source or ConfigMap. See the discussions about configuring MATRIXX web apps and the provided example for more information.
-
Configure the MongoDB server that hosts the Event Repository as follows:
serverAddress
– This is the URL to the server.userName
– This is the user credential to access MongoDB.password
– This is the user password to access to MongoDB.isDNSSeedList
– Whether theserverAddress
is a seed list or not for DNS SRV records, the value of thedbServerAddress
key corresponds to a DNS SRV record. The default value of theisDNSSeedList
key is no. WhenisDNSSeedList
is no, the connection string has the mongodb:// prefix. WhenisDNSSeedList
is yes, the connection string has the mongodb+srv:// prefix.tenants
— A list of tenants in a multi-tenant environment.databaseName
— In multi-tenant environments, this is the name of the MongoDB database to store the tenant's events. When a new tenant is added to MATRIXX, a MongoDB database is created to store the new tenant's events.
mongodb: serverAddress: localhost:27017 userName: MtxApp password: xxxxxxxx isDNSSeedList: "no" tenants: - id: foo serverAddress: localhost:27017 userName: MtxAppFoo password: xxxxxxxx isDNSSeedList: "no" databaseName: MtxEventDatabaseFoo - id: bar serverAddress: localhost:27017 userName: MtxAppBar password: xxxxxxxx isDNSSeedList: "no" databaseName: MtxEventDatabaseBar
-
Set the
ServerAddress
using the following format:host1[: port1][, host2[: port2],...[, hostN[: portX]]][/?replicaSet= name]
host1
- Non-sharded MongoDB deployment —
host1
is the IP address or hostname of the server where your MongoDB instances (mongod
) are running.- One server —
host1
is the address of the server where themongod
instance is running. - More than one server —
host1
is the address of a server where one of themongod
instances in a replica is running.
- One server —
- Sharded cluster —
host1
is the IP address or hostname of the server where yourmongos
instance (MongoDB routing process) runs.
- Non-sharded MongoDB deployment —
portX
— The port number. If a port is not provided, the default is27017
.- Non-sharded MongoDB deployment —
portX
is the port number on the server where amongod
instance runs. - Sharded cluster —
portX
is the port number on the server where yourmongos
instance runs.
- Non-sharded MongoDB deployment —
name
— The replica set to which to connect.
See the discussion about administering the Event Repository in MATRIXX Integration for information about Event Repository configuration and password configuration.
- Save the file.
- Rebuild the configuration image and host it in your image repository.
- Update your Helm values file with the new tag for the image, if necessary. See the discussions about configuring MATRIXX web apps and the provided example for more information.
- Restart RS Gateway.
MongoDB Address Examples
- Connect to the local primary
mongod
running on port 27017:serverAddress: localhost:27017
- Connect to the primary
mongod
on a remote server:serverAddress: 10.10.106.57:27017
- Connect to a replica set by passing a list of
server addresses:
serverAddress: 10.10.106.57:27017,10.10.106.54:27017,10.10.106.55:27017
- Connect to a replica set by passing a seed list
and the name of the replica set:
serverAddress: 10.10.106.57:27017,10.10.106.54:27017,10.10.106.55:27017/?replicaSet=MtxEventReplSet
- Connect to a sharded cluster (connects to the host
and port of the server where the mongos instance runs):
serverAddress: 10.10.176.61:27017