B.7.2 Transaction Store Properties

MicroTx uses a transaction store for persistence of transaction state.

You can use an etcd cluster, Oracle Database, or internal memory for storing transaction information. When you want to use multiple replicas of the transaction coordinator or in production environments, you must set up an etcd cluster or Oracle database as the transaction store. Use internal memory only for development environments as all the transaction details are lost every time you restart MicroTx. If you use internal memory, you can't create multiple replicas of the transaction coordinator.

Type of Transaction Store

Under tmmConfiguration.storage, specify the type of transaction store that MicroTx uses for persistence of transaction state. After specifying the type of transaction store, you can provide additional details to connect to the external transaction store.

Property Description
type

Enter one of the following values to specify the persistent data that you want MicroTx to use to track the transaction information.

  • etcd to use etcd as the transaction store. You must provide details to connect to the etcd transaction store in the storage: etcd: field.
  • db to use Oracle Database as the transaction store. You must provide details to connect to the Oracle transaction store in the storage: db: field.
  • memory to skip entering details to connect to either etcd or Oracle Database and use the internal memory instead. When you use internal memory, all the transaction details are lost every time you restart MicroTx. If you want to use multiple replicas of the transaction coordinator while using the internal memory as transaction store, you must enable session affinity.

Oracle Database as Transaction Store

Under tmmConfiguration.storage.db, specify the details to connect to an Oracle Database. Skip this section and do not provide these values if you are connecting to an etcd database or using internal memory.

For details about creating the required Docker secret, see Create a Docker Secret for Oracle Database Credentials.

Property Description
connectionString

Enter the connection string to the transaction store in Oracle Database.

If you are using a non-autonomous Oracle Database (a database that does not use a credential wallet), use the following format to enter the connection string:
<publicIP>:<portNumber>/<database unique name>.<host domain name>

For example, 123.213.85.123:1521/CustDB_iad1vm.sub05031027070.customervcnwith.oraclevcn.com.

If you are using Oracle Autonomous Database, then enter a connection string similar to the following example: jdbc:oracle:thin:@tcps://adb.us-phoenix-1.oraclecloud.com:7777/unique_connection_string_low.adb.oraclecloud.com&wallet_location=/app/Wallet.

netServiceName Enter the name of the Docker secret that contains the credentials to connect to the Oracle Database. Example, db-secret.

etcd Database as Transaction Store

Under tmmConfiguration.storage.etcd, specify the details to connect to an etcd database. Skip this section and do not provide these values if you are connecting to an Oracle database or using internal memory.

Property Description
endpoints Enter the URL to access etcd as a Docker Swarm service. For example, https://etcd:2379 if etcd and the transaction coordinator are in the same network in Docker Swarm. Where, 2379 is the port used for communication with etcd. In case, you have set up etcd is a separate network, specify the IP address of etcd.
skipHostNameVerification Set this to false to verify the IP address of the etcd database server. If you set this to true, then the server host name or IP address is not verified. You can set this field to true only for test or development environments.

Caution:

You must set this field to false in production environments.
cacertFilePath Enter the path to the ca.pem file, certificate that you have created earlier. For example, /app/etcd/ca.pem.
credentialsFilePath Enter the location of the JSON file, that contains client credentials, client key, and the password that you have used to protect the client certificate. For example, /app/etcd/etcdecred.json.