question

Upvotes
Accepted
1 0 1 4

How the batch requests are to be implemented

It is mentioned that batch request details are provided in the Reuters Elektron EMA Developer Guide, however, this information cannot be found in the Dev Guide.

To provide some context, When a request for market data from a downstream clearing systems is received, our requirement is to request for prices for around 8000 instruments via a single batch request from a Reuters domain. Need to identify if this is possible and if so how it can be done.

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@tharinda

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvote
Accepted
20.3k 73 10 20

Hi Tharinda,

A Batch Request example is included in the EMA dev kit package

e.g. 370__MarketPrice__Batch for EMA C++

and example370__MarketPrice__Batch for EMA Java

Both can be found in the 300 Series Examples folder.

Essentially you need to create and populate and OMMArray with the RIC codes. You then add the OMMArray to an Elementlist as part of the ReqMsg payload.

For example:

int main(int argc, char* argv[])
{
	try {
		AppClient client;
		OmmConsumer consumer( OmmConsumerConfig().username("davec") );
		ifstream ricFile("ftse100.txt");
		string ricCode;
		OmmArray ricArray;
		// read RICS from file into Array
		if (ricFile.is_open())
		{
			while (getline(ricFile, ricCode))
				ricArray.addAscii(ricCode.c_str());
			ricArray.complete();
			ricFile.close();
		}
		// Encode array into ReqMsg
		UInt64 handle = consumer.registerClient( ReqMsg()
			.serviceName( "IDN_SELECTFEED" )
			.payload( ElementList().addArray( ":ItemList", 
			ricArray ).complete() ), client );

		sleep( 10000 );	
	}
	catch ( const OmmException& excp ) {
		cout << excp << endl;
	}
	return 0;
}

In the C++ code snippet above, I am reading RIC codes from a file and then using them to make a batch request.
Please note that I have only tried 100 RICs - so not sure of the impact (if any) of requesting 8000 instruments in a single batch - e.g. on your ADS server during busy periods.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
1.2k 23 28 42

The batch request mechanism is an odd anachronism in RSSL, it can assist with abstractions such as requesting a set of instruments but yields no benefit technically as the request process is slower and each response is still returned individually. EMA today creates an individual request on the wire for each instrument, in the future it may support native batching which means each individual request will be appended to a single message and then forwarded. Each response no matter the underlying request mechanism is still presented individually.

The way forward for improving the request-response round trip time is to use enhanced symbol lists such that a single instrument request in a single message can return many responses. However this requires that the symbol list exists or is prepared before hand and aggregated with Elektron in TREP. Even then not all providers may support the "enhanced" concept of sending all the symbol list constituents from the single request but due to logic in the consuming API this process will be driven by the API instead, reducing the complexity for the developer but ultimately not reducing round trip time.

There is no mechanism to present multiple responses in a single message unless an additional bespoke infrastructure layer is implemented to explicitly do this.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
9.7k 49 38 60

Regarding the location within the EMA documentation, the batch request details are outlined within the Concepts Guide. In addition, if you search within the documentation books, it will pull up references in a few locations, including those mentioned regarding 300 Series Examples folder.

Can you provide where it mentions the batch details are provided in the Reuters Elektron EMA Developer Guide? We can follow up with the development team to further clarify..

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea