How to unsubscribe a ric using EMA API?

Hi Team,

I am using EMA service and subscribing to RIC (I referred Consumer.java from sample code to send these request). Per the requirement I need to unsubscribe the RICS during runtime (considering Consumer application is already in running state)


I would like to unsubscribe to this RIC and couldn't find any sample code demonstrating that.

Could you please let me know how to unsubscribe a RIC using EMA API?

If there is any sample code in package, then please point me to the same.



Best Answer

  • Hello @Maha Rana Parthap Sing ,

    Please refer to EMA Java example 300 MP Close within examples deck included with RTSDK, for the details on unsubscribing or closing item subscription, the full documentation is included in EMA Developer Guide.

    Please note that handle is returned on subscription, and can be saved on subscription:

    long handle = consumer.registerClient(reqMsg.serviceName("ELEKTRON_DD").name("JPY="), appClient);

    as well as obtained from the callback as shown in the example.

    Hope that this information is of help

Answers