question

Upvotes
Accepted
11 1 0 3

How to subscribe to a list of RICs using Refinitiv Java EMA API ?

Hi,

The below sample code snippet at the github shows how to subscribe for one RIC for updates.

consumer.registerClient(EmaFactory.createReqMsg().serviceName("IDN_RDF").name("JPY="), appClient);

I'm looking for sample code to start subscription for more than one RIC (List of RICs).

Any help or pointers appreciated.

Thanks,

Mani


elektronrefinitiv-realtimeelektron-sdkrrtema-apijavasubscriptionric
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.

Upvotes
Accepted
38.1k 71 35 53

@Mani.A

You can refer to the example 370 MarketPrice Batch that demonstrates basic usage of the EMA library while opening multiple item stream via a single request (a.k.a., batch request).

The code looks like this:

            ElementList batch = EmaFactory.createElementList();
            OmmArray array = EmaFactory.createOmmArray();
            
            array.add(EmaFactory.createOmmArrayEntry().ascii("TRI.N"));
            array.add(EmaFactory.createOmmArrayEntry().ascii("IBM.N"));


            batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));
            
            consumer.registerClient(EmaFactory.createReqMsg().serviceName("IDN_RDF").payload(batch), appClient);
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.

Upvotes
11 1 0 3

Awesome. Thank you.

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