Load a Compiled Pricing File

The load_pricing.py script loads a compiled pricing XML configuration file into the pricing database on a processing pod and then, if successful, loads it synchronously onto all other pods in the engine. The pricing XML file can be loaded directly or as part of a pricing ZIP file. If MATRIXX Engine has multiple sub-domains, each sub-domain must have the same base pricing loaded or a version of the same base pricing.

Before you begin

Compile the pricing XML or ZIP file and secure copy it to the /tmp directory on a processing pod in a standby cluster. This directory cannot be in the /opt/mtx directory path.

For more information about the MATRIXX environment variables, see the discussion about container directories and environment variables in MATRIXX Installation and Upgrade.

About this task

While a pricing file is being loaded into the pricing database, any network transactions in progress are rated with the pricing data that was available when the event was first received. All events received after the new pricing plan is deployed are rated with the new pricing data. In a multi-pod environment, deploying a new pricing plan and synchronously updates the pricing on all other pods in the cluster.

Procedure

Enter the following command to load the new pricing configuration, where bladeId is the ID of the processing pod and directory_path/pricing_file is the full path of the pricing XML or ZIP file to load.
Note: The pricing XML file cannot be named with the name specified in the ${MTX_CUSTOM_DIR}/mtx_config.xml file. The load_pricing.py script copies the new pricing file into this directory with the name specified in the mtx_config.xml file.
run_cmd_on_blade.py bladeId "/opt/mtx/bin/load_pricing.py" -f /directory_path/pricing_file"
If the load operation is successful, the new pricing configuration is loaded into the pricing database on each pod in the local engine and on each pod in all other running engines in the domain. If the load operation fails, the pricing database is rolled back to its previous state and an error message is written to the mtx_debug.log file.
Important: If load_pricing.py reports that a pricing message is too large, run the load_pricing.py script again, specifying the -n option with a larger message size.

Results

When the pricing load operation is successful, the current pricing file in the ${MTX_CUSTOM_DIR} directory is renamed with a _PREV suffix for archiving and rollback purposes and the new pricing file is copied into this directory with the name specified in the ${MTX_CUSTOM_DIR}/mtx_config.xml. If a _PREV file exists, it is removed. If the load operation is not successful, the pricing database is rolled back to its previous state.