Hi,
I'm developing an EMA C++ IProvider that publishes services which creation depends on the availability of external data sources.
Those sources and their names are not under the provider control.
To do so, I'm managing the requests on the directory domain at application level, as described in various samples of the EMA SDK.
I'm trying to cover also the corner case where the IProvider can find itself with no services available.
To understand how to build a refresh message on the directory domain with no services, I've used one of the IProvider samples of the SDK where the directory requests are managed by EMA itself, then I removed all the configured services from the IProvider configuration, to learn how EMA behaves in case of any incoming directory requests.
Surprisingly, I've discovered that in case of no configured services, EMA adds always a "DIRECT_FEED" service in the in memory configuration.
The service is created "on the fly" in the EMA method
thomsonreuters::ema::access::DirectoryServiceStore::loadConfigDirectory(...)
Could you explain this behavior? Should I do the same in my application?
Otherwise, what is the right way to signal no services available? Avoid the OmmProvider creation, avoid to reply at all to any directory requests, or reply in a specific way?
I tried to follow the approach documented to reply to an unknown service request, but it doesn't seem to work: the consumer requests to get all the available services go in timeout.
I'm referring to this excerpt of the RDM Usage Guide (pag. 54):
... If the requested service name or service ID is not available, EMA should send a service directory containing an empty map entry in the payload.
If the service becomes available later, the client receives an update message which contains the required service information.
More in details, I tried to build a message as below, please help me to understand if it is correct (I need to send it also to reply to unknown services in case of punctual requests)
event.getProvider().submit(RefreshMsg().domainType(MMT_DIRECTORY).filter(SERVICE_INFO_FILTER | SERVICE_STATE_FILTER).solicited(true).payload(Map().addKeyUInt(0, MapEntry::AddEnum, FilterList().complete()).complete()).complete(), event.getHandle());
Thanks
Best Regards,
Paolo