AMI Configuration Guide
IMPORTANT - TO OVERRIDE PROPERTIES
Create a config/local.properties file and place each property to override on its own line in the format property.name=value
Step By Step
For amione, browse to the 3forge > amione > config directory and create a new, empty local.properties file. For amicenter, amirelay and amiweb browse to the config directory.
You can copy the default.properties to local.properties to get started with good default values.
Why we do this
So that even if you download and update a new version of AMI One, this file will not be overwritten (we will never include a local.properties file in the zip)
#My local.properties located under config directory
#Note, lines starting with pounds are comments
#Override the http port to standard port
#Override the location of the access.txt file
Common Properties (AMI One, AMI Center, AMI Relay, AMI Web)
- f1.terminate.file: if supplied, then a file at specified location will be created. If an external process moves / copies to a file of the same name, but with a ".kill" suffix the process will exit.
- f1.threadpool.default.size: property name associated with the number of threads in the default thread pools.
- f1.threadpool.aggressive: if true will use an "aggressive" thread pool. This pool will wake up faster, but uses more CPU while idle.
- f1.conf.dir: directory to where the configuration files are located, default is config.
- f1.conf.filename: name of the configuration file loaded at start up, default is root.properties.
- f1.timezone: default time zone.
- f1.locale: default locale.
- f1.logs.dir: the root directory for where log files will be deposited.
- f1.plugins.dir: directory of where plugins are located.
- f1.resources.dir: directory of where additional resources will be placed.
- ami.components: a comma delimited list of which components to load. The components include relay, center and web. The default for AmiOne is all three: relay,center,web.
Relay Configuration Properties (AMI One, AMI Relay)
Relay General Properties (AMI One, AMI Relay)
- ami.relay.id: Sets the unique name of the relay. This is used to distinguish relays on the front end (when there are multiple relays connected to a single center). Each relay should have a unique id
- ami.port: Sets the port that applications connect to on the Relay's host machine. The default port is 3289. See AMI Realtime API
- ami.port.bindaddr: Optional. Specifies the network interface that the ami.port server port be bound to
- ami.port.whitelist: Provide either a list of permitted hostname patterns or plugin for blocking/granting access based on foreign network address. Syntax is either file:<file_containing_a_hostname_patterns_per_line> or text:<comma_delimited_list_of_hostname_patterns> or plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin>
- ami.log.messages: If set to true, all messages sent into and out of ami relay to/from other applications will be logged to a file
- ami.send.cr: If set to true, by default the relay will send a CR back on each response, in addition to a new line
- ami.center.host: Sets the hostname of the primary instance of ami center
- ami.center.backup.port: Optionally, sets the port of the backup instance of ami center
- ami.center.backup.host: Optionally, sets the hostname of the backup instance of ami center.
- ami.ssl.port: Optionally, sets the secure port that ami center is listening on.
- ami.ssl.backup.port: Optionally, sets the secure port that the backup ami center is listening on.
- ami.center.ssl.keystore.file: The path to the key store file, generated using java's keytool.
- ami.center.ssl.keystore.password: The password associated with the key store file
- ami.relay.guaranteed.messaging.enabled: If true, the relay will use a store and forward journal to record messages to disk prior to an ACK message being sent to the originating client. The journal can also be used to deliver messages to late-subscribing Ami Centers. Default is false.
- ami.relay.persist.dir: Where to store the recovery journal files, if ami.relay.guaranteed.messaging.enabled is set to true. Default is ./persist
- ami.centers: A comma delimited list of centers' host:port to connect to. You can optionally prefix host:port with an alias in the form alias=host:port, in which case the alias will be used to reference the center within the relay.routes file. If an alias is not provided, then the alias is the host:port. Ex: ami.centers=myprimary=localhost:3270,other=some.host.com:3270
- ami.relay.routes.file: a file containing routing tables used for controlling which real-time streaming messages are sent to which center(s). Default is data/relay.routes See relay.routes file for details. Note, if a file is not found, a placeholder file with instructions will be created there.
The relay can be connected to any number of centers (see ami.centers property). By default, as messages sent from an external source into a relay they are forwarded to all centers. By adding rules to the relay.routes file (see ami.relay.routes.file) you can control which centers are receiving messages based on any parameters within a message and/or the structure of the message itself. Each line within the file is an isolated rule. Changes to this file will take effect immediately.
Each line in the relay routes file is an isolated rule, with the following format:
|ROUTE_NAME||Unique name of rule|
|PRIORITY||Higher priority rules execute first. Lower numbers have higher priority, with 0 being the highest priority. Ties are determined using alphabetical route name|
|MESSAGE_TYPES||Comma delimited list of messages types, only O (object), D (delete), C (Command) and S (Status) are supported, * - all types|
|OBJECT_TYPES||Comma delimited list of types to evaluate by this rule. Blank - skip rule, * - all types|
|PARAM_TYPES||Comma delimited list of param types for the rule in the format: Name Type [nonull]|
|EXPRESSION||Expression to evaluate, must return boolean, true return value indicates rule succeeded|
|ROUTE_LIST||Comma delimited list of centers to send message to. Blank - no centers, * - all servers|
|ON_TRUE||Action if Expression returns true: BREAK - stop evaluating rules, blank or CONTINUE - continue evaluating next rule|
|ON_FALSE||Action if Expression returns false or null: BREAK - stop evaluating rules, blank or CONTINUE - Continue evaluating next rule|