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?

Best Answer

  • 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.

Answers