1. Home
  2. Article Catalog
  3. How to test WebSocket connection with rmdstestclient tool

ARTICLE

How to test WebSocket connection with rmdstestclient tool

Wasin Waeosri
Developer Advocate Developer Advocate

Overview

Update: January 2021.

Websocket API for Pricing Streaming and Real-Time Service aka Websocket API enables easy integration into a multitude of client technology environments such as scripting and web. This API runs directly on your Refinitiv Real-Time Distribution System and presents data in an open (JSON) readable format. The API supports all Refinitiv data models and can be integrated into multiple client technology standards e.g. JavaScript, Python, R, .Net, etc.

The rmdstestclient tool is a general-purpose Refinitiv Real-Time consumer application. Its basic functionality is to load a list of RICs from file and request data of them from Refinitiv Real-Time sources like the Refinitiv Real-Time Advanced Distribution Server, EMA server, and Real-Time SDK OMM Provider.

This article shows how to use the Real-Time Advanced Distribution Server 3.2 (and above) rmdstestclient tool to verify and test the WebSocket connection and subscription.

*Note: The initial release of this API is for deployed Refinitiv Real-Time Advanced Distribution Server customers only (i.e. to use it you will need an installed version of Refinitiv Real-Time Advanced Distribution Server 3.2.1 and above).

WebSocket Overview

WebSocket specification defines an API that enables web pages to use the WebSockets protocol for two-way communication with a remote host. It introduces the WebSocket interface and defines a full-duplex communication channel that operates through a single socket over the Web. This specification was also later applied to other client technology sides like Python, Ruby, Go, Java, etc.

Figure-1: WebSocket connection diagram

rmdstestclient tool Overview

The rmdstestclient is a command-line tool bundled with Real-Time Advanced Distribution Server 3.2 package. It supports various Real-Time Advanced Distribution Server connection types (RSSL, WebSocket, etc), various Refinitiv Data Domain data (Market Price, Market By Price, Market By Order, etc). This tool is perfect for verifying the Real-Time Advanced Distribution Server connection and subscription. This tool is available at <Real-Time Advanced Distribution Server package>/<platform>/demo folder.

Figure-2: Real-Time Advanced Distribution Server 3.2 demo folder structure

Basic rmdstestclient arguments and how to run the tool

You can run rmdstestclient tool via the following steps:

  1. Goto <Real-Time Advanced Distribution Server 3.2 package>/<platform>/demo folder via the command line (from Linux terminal or any SSH applications)
  2. Export LD_LIBRARY_PATH to <Real-Time Advanced Distribution Server 3.2 package>/<platform>/demo location via the following command
    	
            
$>export LD_LIBRARY_PATH=<Real-Time Advanced Distribution Server package>/<platform>/demo

3.   Create the item.txt file, then input the RIC name in each line

    	
            

TRI.N

VOD.L

PTT.BK

4.   Run the rmdstestclient tool via the following command

    	
            
$>./rmdstestclient -S <Service name> -h <Real-Time Advanced Distribution Server IP Address or Hostname> -ct <Connection type> -p <WebSocket port> -l stdout -X -f item.txt -v -d 3 –Z –md <domain> –u <username>

You can run it with just ./rmdstestlcient command to get information of all command-line arguments that you can set with the tool

Figure-2: rmdstestclient manual

How to connect rmdstestclient with WebSocket connection

Users can use -ct ws_json2 -dfile <RDMFieldDictionary file> -p parameters to connect rmdstestclient with Real-Time Advanced Distribution Server WebSocket connection.

  • -ct ws_json2 parameter means to specify the tool to connect to Real-Time Advanced Distribution Server via the WebSocket connection
  • -dfile <RDMFieldDictionary file> is a required parameter when connecting via WebSocket connection. This parameter specifies the Refinitiv Real-Time's Dictionary RDMFieldDictionary file for rmdestestclient tool.
  • -p <WebSocket port> specifies the Real-Time Advanced Distribution Server WebSocket port (this port can be configured in Refinitiv Real-Time Advanced Distribution Server configurations *ads*wsPort parameter)

Example command

    	
            
$> ./rmdstestclient -h 172.20.33.11 -p 17000 -S ELEKTRON_DD -ct ws_json2  -dfile ./RDMFieldDictionary -l stdout -X -f item.txt -v -d 3 –Z –md 6 –u api

Result