You can find general information on changing adapter properties in the online developer documentation: Configuring your RET Adapters.

From completing the previous training modules in this series, you should by now have a running environment along with all the RET adapters exported as fully operational blades. If you were to connect your current environment and Caplin’s back-end systems (Caplin Platform) to Caplin’s front-end application — the FX Professional Motif — you would be able to see trading data and carry out ESP (executable streaming price) trades.

In this training module you will learn how to configure the behaviour of your adapters by changing their configuration files - namely adapters.properties and trapi-configuration.properties. You can find these files inside your Deployment Framework directory under /global_config/overrides/<Adapter>/etc/.

## Objectives

You will look at ways of modifying default RET adapter behaviour using existing config options, where you will:

• Edit specific configuration files for each of the RET Adapters.

• Look at configuring the RET connection properties as well as defining various adapter properties.

There are different ways to configure the RET Adapters depending on what layer and which connection you are looking at.

The adapter configuration options for the datasource as well configuring the datasource behaviour with Liberator and Transformer can be found in this document: Change server-specific configuration. You can refer to the examples contained in that documentation as a guide.

The `adapter.properties` define the behaviour of an adapter. You can find the adapters properties under global_config/overrides/<Adapter>/etc/adapter.properties. All possible configuration options of an adapter can be found either in your adapters adapter.properties file or the documentation folder in the CaplinRETAdapterSuite as templates.

Example `adapter.properties` config, displaying the various options available:

```# Common adapter settings

# Time gap between two trades for the same currency
# one_click_gap_time=

# Time interval for JMX statistics publishing
# jmx_publish_interval=

# Enables the director user manager
# use_director_user_manager=

# These are the precious metal unit conversions.
metal_conversion=XAUUSD:[KG 995, 31.99], [KG 999, 32.12], [KG 9999, 32.148], [100G 999, 3.212], [10 TOLA, 3.746]
metal_conversion=XAGUSD:[KG,32.1507], [TON, 32150.7]
metal_conversion=XPTUSD:[KG, 32.150722]
metal_conversion=XPDUSD:[KG, 32.150722]

message_translation=code:104,category:TradeRejection,pattern:.*One click deal do not have valid price.*
message_translation=code:105,category:TradeRejection,pattern:^Trading in currency .+ has been suspended$message_translation=code:106,category:TradeRejection,pattern:.*Trader terminated.* message_translation=code:107,category:TradeRejection,pattern:^Represented user .+ does not have permission to submit this order$
message_translation=code:109,category:TradeRejection,pattern:.*Taker log differs from submit XML.*
message_translation=code:111,category:TradeRejection,pattern:.*is not a valid settlement date.*

# Set this to true to enable the alert feature for orders

# The order statuses that trigger an alert on the front end.

# Enable to check time gap between two trades for the same currency
use_global_one_click_gap_time=false

# How many days to fetch for historic blotter and hour when to restart the adapter # historic_blotter_days_to_fetch= # blotter_rollover_hour=
# Set this if you want the executed & historic blotters to show
# only the completed deals. Otherwise don't set these attributes as by default they are both false.
executed_blotter_display_only_completed_deals=false
historic_blotter_display_only_completed_deals=false

# Load permissions from different sources in one transaction instead of separate once

### Message Translations

Message translations are regular expressions (regex) that match any exceptions thrown by Reuters APIs that we then map to an error code. With the FX Professional Motif web app, this allows you to handle errors more effectively.

If the adapter receives an error message via RET and there is no matching message translation defined, the Adapter will then send out a default error code. This code will be 199 for all RET Adapters except for the Order Adapter, where the code will be 299 instead.

Configuring the `adapter.properties` above is dependant on how your RET system integration is setup, this makes it difficult to generate specific error behaviour. Therefore, while we don’t provide any exercises on configuring `adapter.properties` you are free to play around with some of the options available providing that your system allows it.

## Configuring the trapi-connection.properties

The `trapi-connection.properties` file is used to define the behaviour of the connection between the `<adapters>` and the RET system, via the Reuters Trading API (TrAPI). You can access these connection properties under global_config/overrides/<Adapter>/etc/trapi-connection.properties.

All `trapi-connection.properties` config for an adapter can be found either inside the adapters `trapi-connection.properties` file, or in templates that are available within the documentation folder inside CaplinRETAdapterSuite.

### Try this yourself

If you remember previously, you made some changes to the `trapi-connection.properties` in the Creating a RET Adapter training module to connect to your RET system for each adapter.

In following exercise you will learn how to change a configuration option to load only a specific set of properties.

`currency_pairs_to_load=EURUSD,GBPUSD,USDCAD,USDCHF,EURGBP`
`./dfw start`
The config change we made to `/trapi-configuration.properties` is helpful when analysing bugs with a smaller set of currencies, and it enables adapters to load faster.