question

Upvotes
Accepted
21 0 1 4

Use different registration for different serviceName

We are trying to combine real time and delayed market/stocks indexes using one single java example. we have set the needed batch file of the RIC for each kind. and after registering the req only the first request is running. Below the code used for registering:

batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));
batch.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, arrayView));
consumer.registerClient(EmaFactory.createReqMsg().serviceName("hEDD").payload(batch), appClient);

batchdelayed.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));
batchdelayed.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
batchdelayed.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, arrayView));
consumer.registerClient(EmaFactory.createReqMsg().serviceName("hdEDD").payload(batchdelayed), appClient);

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.

Upvotes
Accepted
21 0 1 4

Hello @Pimchaya.Wongrukun

After some troubleshooting, i was able to overcome the issue and was able to make it run properly. My mistake was in the second part where i have to add the ENAME_BATCH_ITEM_LIST to be the array of the delayed RICs.

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
9.5k 10 5 7

Hello @rami.habbas

I have tested your given snipped source code and I could get data from the difference service name successfully. Hence, the given source code should be correct. To be able to continue investigating this problem, please attach the EMA xml trace file when the problem occur.

You can enable the trace in EMA Java application by setting XmlTraceToStdout parameter of the Consumer node your application uses(default is "Consumer_1") to be 1. The parameter is in EmaConfig.xml file your application uses (the default is in the application run directory).

For example:

<Consumer>
  <Name value="Consumer_1"/>
  ...
  <XmlTraceToStdout value="1"/>
</Consumer>

Then, EMA traces its received and sent messages in XML format to stdout/console.

The xml trace log can be long so please redirect your application command output to a file as the syntax below:

Java_command_line_runing_your_application > output_file_name
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