question

Upvotes
Accepted
21 0 2 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-sdkema-apirrtelektron-message-api
icon clock
10 |1500

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

Upvotes
Accepted
21 0 2 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 512.0 KiB each and 1.0 MiB total.

Upvotes
9.6k 10 7 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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