Trading Session Gateway quickstart guide
Overview Copied
Use this quickstart to install Trading Session Gateway (TR Gateway) on a Linux or Windows host, connect it to the file streamer, and publish dataviews in Geneos.
The steps are the same for FIX, OUCH, SQF, and DROP. Only the log sources, framing, and dialect settings vary by feed.
For architecture, sizing, operations, dataviews, and message search, see the Trading Session Gateway user guide. For YAML fields and examples, see the configuration reference.
Prerequisites Copied
Before you start, make sure you have:
- A TR Gateway installation bundle for Linux or Windows from ITRS Downloads. Replace
<package>in the paths below with the package name that ITRS supplies for your feeds. See Choose the package. - The file streamer already installed and configured to tail your trading logs. It is the File Streamer Collection Agent plugin, and it must include the gRPC reporter. TR Gateway receives those records over gRPC. This quickstart uses the file streamer. The top-level
data-dirlane is separate. On that lane, TR Gateway ingests and tails log files itself, without the file streamer, for example on an offline instance. See Ingestion lanes. - A Licence Daemon with grants for the protocol families you want to monitor.
- A Geneos Gateway and Active Console, if you want dataviews in Geneos.
TR Gateway includes a Java runtime. You do not need to install a system Java. For operating system support, host sizing, and ports, see Prerequisites in the user guide.
These ports are used in the examples:
| Port | Purpose |
|---|---|
9500 |
Example gRPC ingestion port. Set it per channel with grpc-port. The default is 0, which disables the port. |
8080 |
Status/Search UI (optional). Default for status-server.port. |
7035 |
Example Geneos probe listener port (when Geneos publishing is enabled) |
7041 |
Licence Daemon (default) |
Allow inbound traffic on the gRPC port from the file streamer. If you enable Geneos publishing, allow the Geneos Gateway to reach the probe listen port.
Install on a Linux host Copied
-
Download and extract the Linux bundle (
tr-gateway-<package>-<version>-linux-x64.tar.gz), then move the extracted directory to/opt/tr-gateway. -
Create a service user and give that user ownership of the installation directory.
-
Edit
/opt/tr-gateway/config/tr-gateway.yaml. Complete the settings in Configure TR Gateway. -
Install the packaged systemd unit.
sudo cp /opt/tr-gateway/service/tr-gateway.service /etc/systemd/system/ sudo systemctl daemon-reload -
The shipped template reads
host: ${env:TRG_LICD_HOST}, and the unit does not set it. Add the variables in a systemd drop-in withsudo systemctl edit tr-gateway:[Service] Environment="TRG_LICD_HOST=licd.example.com" # Only if protocol-dialects uses these variables. Use the values from your ITRS account manager. Environment="TRG_OUCH_DIALECT=<ouch-dialect>" Environment="TRG_SQF_DIALECT=<sqf-dialect>" Environment="TRG_DROP_DIALECT=<drop-dialect>"Set only the dialect variables for the families that you keep in
protocol-dialects. Replace<ouch-dialect>,<sqf-dialect>, and<drop-dialect>with the values from your ITRS account manager, and omit the angle brackets. Copying a placeholder as written stops TR Gateway at startup. -
Enable and start the service.
sudo systemctl enable tr-gateway sudo systemctl start tr-gateway
For the complete extract, service-user, and ownership commands, see Install on Linux in the user guide.
Install on a Windows host Copied
-
Download and extract the Windows bundle. For example:
Expand-Archive tr-gateway-<package>-*-windows-x64.zip -DestinationPath C:\ -
Edit
C:\tr-gateway-<package>-<version>-windows-x64\config\tr-gateway.yaml. Complete the settings in Configure TR Gateway. -
Set the environment variables, then start TR Gateway from Command Prompt. The shipped template reads
host: ${env:TRG_LICD_HOST}. Set the dialect variables only ifprotocol-dialectsuses them.set TRG_LICD_HOST=licd.example.com set TRG_OUCH_DIALECT=<ouch-dialect> set TRG_SQF_DIALECT=<sqf-dialect> set TRG_DROP_DIALECT=<drop-dialect> cd /d C:\tr-gateway-<package>-<version>-windows-x64 bin\tr-gateway.bat config\tr-gateway.yamlReplace
<ouch-dialect>,<sqf-dialect>, and<drop-dialect>with the values from your ITRS account manager, and omit the angle brackets. Copying a placeholder as written stops TR Gateway at startup.TR Gateway runs in the foreground. Keep the Command Prompt window open while it is running. Start it from the install directory, because the shipped template uses relative data paths.
-
Optional: Register the launcher as a Windows service with NSSM, set the same variables with the NSSM
AppEnvironmentExtrasetting, and setAppDirectoryto the install directory. The bundle does not include a native service wrapper, andsc.exeis not suitable for the.batlauncher.
For service registration notes, see Install on Windows in the user guide.
Configure TR Gateway Copied
Edit tr-gateway.yaml before you start, or restart after you change it. Set at least:
- Licensing — Licence Daemon host and port.
- Channels —
type: streaming, an optionalprotocolhint, gRPC port, payload encoding, journal directory, and default session IDs for protocols that do not identify a session on the wire. - Protocol dialects — required for every non-FIX family you stream. The shipped
tr-gateway.yamllists the values for the families it is built for, so keep them. For theallpackage, ask your ITRS account manager which template and values to use. If you use the${env:...}variables instead, set them as the install steps describe. The dialects you can use depend on your package and license. Contact your ITRS account manager for the values. - Local CompID prefixes — recommended for FIX direction.
- Geneos instrumentation — probe name, managed entity, sampler name, and listen port. These names must match the Geneos Gateway setup. The shipped template already enables Geneos publishing.
- Search and search commands — retained trade-message lookup, which requires extra host memory. The shipped template already turns on search and search commands, so a stock installation has them. Remove them if you do not want them.
- Optional Status server — browser UI on port
8080by default. Setbind-address: 127.0.0.1, because the UI has no authentication or TLS. - Optional Schedules — operational hours and holiday calendars. Every operational schedule needs a
timezone.
Important
Set dialect and CompID prefix values so they match the feed. TR Gateway still starts if they are wrong, but sessions and dataviews can be incorrect. For more information, see Silent-correctness settings.
Keep secrets out of the file. Use
${env:VAR}substitution.
For the full field tables and worked examples, see the configuration reference.
Connect the file streamer Copied
Point the running file streamer at TR Gateway so it can stream records to a channel gRPC port.
- Set the gRPC reporter target to the TR Gateway host name or IP address and the channel
grpc-port. - Match the framing to the feed. For example, use
fix-asciifor FIX text logs. Setpayload-encodingon the TR Gateway channel to match what the file streamer sends. The shipped templates usebase64. - Set these required producer settings:
protocolon each OUCH, SQF, and DROP source:protocol: OUCH,protocol: SQF, orprotocol: DROP. The file streamer reads SQF as OUCH and stamps the event with that value. TR Gateway then decodes the records as OUCH, and the stream continues. A value stamped on the event overrides the channelprotocolhint.read-from-beginning: truepartitioner: direction-sessionon each OUCH, SQF, and DROP sourcebatch-sizeequal tologs-batch.sizelogs-batch.maxRetries: -1
- Confirm that the file streamer can reach the gRPC port and that TR Gateway is receiving records.
For the full producer checklist, see File streamer. For configuration details, see File Streamer Collection Agent plugin.
Verify the installation Copied
- Confirm that TR Gateway is running. On Linux, run
systemctl status tr-gateway. On Windows, check the Command Prompt window if you started TR Gateway in the foreground, or check the registered service. - If the Status UI is enabled, open
http://localhost:8080on the TR Gateway host. The recommendedbind-addressis127.0.0.1, so the UI is not reachable from other machines. - Confirm that the file streamer is sending records and that sessions appear in the UI.
- If Geneos publishing is enabled, confirm that the Geneos Gateway can reach the probe listen port.
For health checks and start/stop commands, see Install and run TR Gateway in the user guide.
Publish dataviews to Geneos Copied
- Check that
instrumentation.geneosis enabled intr-gateway.yaml(the shipped template enables it), and restart TR Gateway after any change. - In Gateway Setup Editor, add a probe that specifies the TR Gateway host and listen port.
- Add a managed entity and sampler whose names match the YAML values. Use the API Streams plugin.
- Connect Active Console to the Geneos Gateway, and then confirm that dataviews appear under the managed entity.
For probe XML, sampler XML, and TLS notes, see Configure the Gateway Setup Editor in the user guide.
Next steps Copied
After TR Gateway is running and sessions appear:
- Review published dataviews and add rules in Geneos.
- Use message search to look up retained trade messages. The search commands appear in Active Console on their own once
search-commands.enabledis true. - Use the Status UI for live diagnostics.
- Tune heap, journals, and retention for your session count. See Prerequisites and Configure JVM options in the user guide.
- Use the configuration reference when you add protocols, schedules, or TLS.