question

gaurav.mahajan avatar image
19 3 7 8

Not getting data while using user_dispatch mode in EMA?

Dears @nick.zincone.1,@Umer Nalla, @Olivier DAVANT

While using USER_DISPATCH mode, i am not getting the market price data. I tried While referring to few of the samples in MarketPriceStepByStepExample and replaced it with our service name. I am getting the below error while using this :-

>>> Dispatching events until <Item Name> is complete

ERROR - OmmConsumer event dispatching failed: The enum value 1 for the Field ID 6513 does not exist in enumerated type definitions

Could someone suggest what i am missing here?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apidispatchdispatcher
10 |1500

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

nick.zincone avatar image
11.7k 57 39 60

Hi @gaurav.mahajan,

The error you are seeing may be a result of outdated dictionary files within the ADS you are connected to. I would first try on the step by step EMA Java tutorials (Step 2) that uses the default operation model: API_DISPATCH and check your results. There shouldn't be a different between the 2 operation models. If you suspect it could be the ADS dictionaries are out of date, you can try to use local dictionaries. For this, you will have to utilize a configuration file which includes a Dictionary Group which allows you to use local dictionary files. Local dictionary files are included within your EMA package within the subdirectory: Ema/etc.

Just to make sure were in sync in terms of what I did, I took the above Step 2 tutorial and modified it to use the USER_DISPATCH operation model. Sections I changed:

consumer = EmaFactory.createOmmConsumer(
	config.host("elektron:14002")
	      .username("user")
              .operationModel(OmmConsumerConfig.OperationModel.USER_DISPATCH)
	);
...
// Instead of a sleep, I did this:
long startTime = System.currentTimeMillis();
while (startTime + 60000 > System.currentTimeMillis())
    consumer.dispatch(10);

After running this, I received the expected results.

Try some of these suggestions and let us know what you find.

thanks.

10 |1500

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

Gurpreet avatar image
14.7k 39 12 18
@gaurav.mahajan

Seems like you are using an old data dictionary. Can you verify that it is latest, or if you are downloading from TREP, it is the latest version.

This problem should not be related with EMA dispatch mode.

10 |1500

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

gaurav.mahajan avatar image
19 3 7 8

Thanks much @nick.zincone.1 and @Gurpreet.! That helps, i was using old dictionary.

10 |1500

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