D.2 Environment Variables for Transaction Coordinator
Provide values for the following environment variables to configure the MicroTx transaction coordinator. These details are required to deploy MicroTx.
Property | Description |
---|---|
TMM_APPNAME |
Enter the name of the MicroTx application that you want to create when you install MicroTx. Note down this name as you will need to provide it later. For example, tmm-app .
|
PORT |
Enter the port over which you want to internally access MicroTx within the Kubernetes cluster where you will install this service. Create the required networking rules to permit inbound and outbound traffic on this port. Note down this number as you will need to provide it later. For example, 9000 .
|
ID |
Enter a value to uniquely identify each instance of MicroTx that you install. The unique identifier must have 5-characters and can contain only alphanumeric characters (a-z, A-Z, and 0-9). For example, Use this ID to identify MicroTx when there are multiple installations. You cannot use this ID to differentiate between replicas of a single instance of MicroTx installation as all the replicas have the same ID. You can't change this value after installing MicroTx. |
APPLICATION_NAMESPACE |
Specify the namespace in which you want to deploy MicroTx. |
LISTEN_ADDR |
Enter the port over which you want to access MicroTx. Create the required networking rules to permit inbound and outbound traffic on this port. Note down this number as you will need to provide it later. For example, 0.0.0.0:9000 . Specify the listener address in the format, <IP_address>:<port> , as provided in the example.
|
INTERNAL_ADDR |
Enter the internal URL to access MicroTx from within the environment where you will install the service. See Access MicroTx in Docker Swarm. |
EXTERNAL_ADDR |
Enter the external URL to access MicroTx from outside the environment where you will install the service. See Access MicroTx in Docker Swarm. |
HTTP_CLIENT_TIMEOUT_IN_SECS |
Specify the maximum amount of time, in seconds, for which the HTTP callback API requests sent by the MicroTx coordinator to the participant services remains active. Enter an integer between 0 to 900. The default value is 180 seconds and the maximum value is 900 seconds. If you set this value to 0, then MicroTx does not enforce any limit. When the coordinator sends a HTTP callback API request to the participant services, the participant services must respond within the time period that you specify. If the participant service does not respond within the specified time period, the HTTP request sent by the coordinator times out. |
XA_COORDINATOR_ENABLED |
Set to true if your microservices use the XA transaction protocol. If you want to nest an XA transaction within a Saga transaction, set both XA_COORDINATOR_ENABLED and LRA_COORDINATOR_ENABLED to true .
|
XA_COORDINATOR_TX_MAX_TIMEOUT |
Only for the XA transaction protocol. Specify the maximum amount of time, in milliseconds, for which the transaction remains active. If a transaction is not committed or rolled back within the specified time period, the transaction is rolled back. The default value is 600000 ms. |
LRA_COORDINATOR_ENABLED |
Set to true if your microservices use the Saga transaction protocol. If you want to nest an XA transaction within a Saga transaction, set both XA_COORDINATOR_ENABLED and LRA_COORDINATOR_ENABLED to true .
|
TCC_COORDINATOR_ENABLED |
Set to true if your microservices use the TCC transaction protocol.
|
NARAYANA_LRA_COMPATIBILITY_MODE |
Only for the Saga transaction protocol. Set this property to true when you want to use Saga participant applications that were implemented to work with the Narayana LRA Coordinator and now would participate in Saga transactions using MicroTx. Enable this mode to ensure that the MicroTx Saga APIs return the same response data that Narayana LRA Coordinator APIs return.
|
LOGGING_LEVEL |
Enter one of the following types to specify the log level for MicroTx:
|
HTTP_TRACE_ENABLED |
Set this to True to log all the HTTP request and responses in MicroTx when you want to debug. If you set this to True , you must also set the LOGGING_LEVEL to debug .
|
LOGGING_DEV_MODE |
Set this to True only in test environments to get more details for debugging purposes. You must set this to False in production environments.
|
MAX_RETRY_COUNT |
The maximum number of times that the transaction coordinator retries sending the same request again in case of any failures. The default value is 0. |
MIN_RETRY_INTERVAL |
The minimum interval, in milliseconds, after which the transaction coordinator retries sending the same request again in case of any failures. The default value is 0. |
MAX_RETRY_INTERVAL |
The maximum retry interval, in milliseconds, before which the transaction coordinator retries sending the same request again in case of any failures. For example, 10000. The default value is 0. |
SKIP_VERIFY_INSECURE_TLS |
Oracle recommends that you set this value to If you set this value to Caution: Do not set this value totrue in production environments.
|
SERVE_TLS_ENABLED |
Set this to true to enable TLS to ensure secure communication between participant services and MicroTx. You must provide details for the certificate and key file under SERVE_TLS_CERT_FILE and SERVE_TLS_KEY_FILE properties. When you enable TLS, you can access the transaction coordinator over HTTPS.
For secure access to MicroTx over HTTPS, create a self-signed certificate and note down location of the certificate and private key. For information about creating an SSL certificate, see Guidelines for Generating Self-Signed Certificate and Private Key using OpenSSL in Security Guide. If you set this field to Caution: You must set this totrue in production environments.
|
SERVE_TLS_CERT_FILE |
Path to the TLS certificate, in PEM format, on your local machine. |
SERVE_TLS_KEY_FILE |
Path to the private key file, in PEM format, which is associated with the certificate on your local machine. |
COMPLETED_TX_TTL |
The time to live (TTL) in seconds for a completed transaction record in the transaction data store. The permissible range of values is 60 to 1200 seconds. When the specified time period expires, the completed transaction entry is removed from the data store. The default value is 60 seconds. |
AUTHENTICATION_ENABLED |
Set to false to bypass JWT authentication. This permits requests that do not have JWT tokens. Enter true if you want all requests to have a JWT token. MicroTx validates the token provided in the request and denies access if the token is invalid. If you set enabled as , then you must provide values for the issuer and jwksUri parameters of the JWT.
Caution: You must set this property to |
AUTHORIZATION_ENABLED |
Set this to true to enable MicroTx check the subject in the incoming JWT token. MicroTx then tags the subject or user against the transaction ID, and further changes to the transaction is allowed only by the tagged subject or user. If you set this field to false , you don't have to provide identity provider details.
|
IDENTITY_PROVIDER_URL |
Specify the URL of the identity provider. This information is required to create a new access token by using the refresh token. If you do not provide this information, expired access tokens are not auto-refreshed. |
IDENTITY_PROVIDER_CLIENT_ID |
Specify the client ID of the identity provider. This information is required to create a new access token by using the refresh token. If you do not provide this information, expired access tokens are not auto-refreshed. |
Parent topic: Configure Coordinator Using Environment Variables