Replay¶
Past realtime messages sent to the Relay (usually from Feed Handlers and Clients) can be replayed from a AMI messages log file (e.g. AmiMessages.log
). This is useful for retrieving and rendering data from otherwise hard-to-read data from AMI real-time message log files
Step-by-step Guide¶
-
Telnet into the platform's real-time streaming port, this is set by the property
ami.port
and is 3289 by default -
Login with a string identifying your process (in this case,
demo
) -
Run your replay command e.g.
Replay Command¶
The replay command has several options, below is a breakdown of each one for this example:
T="Replay"
- Indicates a replay command
LOGIN="xxx"
- Required login instruction for replay file
FILE="/path/xxx.log"
- Name and path to AMI messages log file to replay, this can be absolute or relative to path from the AMI application installation directory
amione/
MAXDELAY=xxx (long)
- OPTIONAL, delay between each line read from log file. This is referred to as MAXDELAY as it does not guarantee exactness
MAX_PER_SECOND=xxx (long)
- OPTIONAL, maximum number of lines read from the log file per second. This is referred to as MAX_PER_SECOND as it does not guarantee exactness
Note
Multiple files can be replayed within the same command, with the file names and paths delimited with a comma. For example: