We are using the EMA API with AWS Endpoints to obtain market data.
We have direct connectivity to the endpoint both within AWS and on-premises (using AWS Direct Connect).
We note that even when using an AWS endpoint, the authentication process (obtaining an access token) required to talk to the endpoint needs to be done over the Internet, as 'api.refinitiv.com' is not reachable any other way.
While this is no problem in AWS (where we have native routed Internet connectivity via NAT), it is a problem on premises, because the use of an HTTPS proxy is required to access 'api.refinitiv.com', but that proxy should NOT be used for accessing the AWS endpoint over Direct Connect.
When we use EmaFactory.createOmmConsumer(), we have to configure the 'tunnelling proxy', but doing so results in EMA attempting to connect to the AWS endpoint over the HTTPS proxy, which is incorrect; we want to get the authentication token using the proxy, but connect to the endpoint directly.
How can we work around this? It seems to be a catch-22, because if we enable the proxy we can't reach the AWS endpoint, but the AWS endpoint requires a token that can only be fetched via the proxy.
Looking at the EMA Python examples it seems that the authentication function can be severed from the market data consumption, but that doesn't seem to be the case in the Java API.
Any hints on how we can do this would be welcome. Until then, we have to hack around the situation by making 'api.refinitiv.com' point to an internal host with Internet connectivity which then forwards anything received on port 443 to the real 'api.refinitiv.com', but I would prefer to avoid having to do that.