For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Exceeded maximum number of mounts per user.

Hello,

We are using WebSocketAPI for pricing streaming (Service: ELEKTRON_DD)

Implementation is done on JAVA.

Every RIC request(Item request) is using own webSocket connection. Up to 10 requests, everything is okay, but after I have an exception: Exceeded maximum number of mounts per user.

First question: is it correct to use one webSocket connection per 1 request? When I tried to use the same webSocket connection for two requests I had another exception: Request Rejected: Cannot request new item on open stream.

Second question, if it is correct to use one session per request, how can we increase number of mounts?


Thanks!

streaming-prices
icon clock
10 |1500

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

hi @mario.marchl ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@mario.marchl

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvote
Accepted
22.1k 59 14 21

Hi @mario.marchl,

Are you connecting to local market data infrastructure or RTO in cloud?

Either way, your application should only open one websocket connection for multiple subscriptions, as long as your network can handle the bandwidth of the streaming updates - which it can easily for 10 instruments.

When sending the second subscription request, please ensure that the ID is unique.

icon clock
10 |1500

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

Upvote
17.4k 82 39 63

Hi @mario.marchl

It is not best practice to assign a new connection for each item request. The API supports the ability to handle thousands of requests per connection. Regarding the exception you received, are you requesting for the same item within the same connection? Also, is it an exception? Or did you receive a status response indicating the request was closed because the request was rejected?

icon clock
10 |1500

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

Upvotes
1 0 0 0

Thank you for quick reply, I assume we are using in a cloud, because we are using following URLs:
provider=aws, endpoint=eu-west-1-aws-1-sm.optimized-pricing-api.refinitiv.net.

Can you tell me if following course of actions are correct.

We create webSocket connection:

         this.webSocket = websocketFactory.createSocket(this.url)
                    .addProtocol("tr_json2")
                    .addListener(new WebSocketAdapterImpl(this))
                    .addExtension(WebSocketExtension.PERMESSAGE_DEFLATE);

            this.webSocket.connectAsynchronously();

After that we have to send only one login request for all our rics:

       refinitivMessage.setId(1)
                .setDomain("Login")
                .setKey(new Key()
                        .setElements(new Elements()
                                .setApplicationId(APP_ID)
                                .setPosition(this.position)
                                .setAuthenticationToken(this.authToken)
                        ).setNameType("AuthnToken"));


And in the end, we can send our ric requests:

 message.setId(2)
                .setKey(new Key()
                        .setName(this.ricRequest.getRic())
                        .setService(SERVICE)).
setView(this.ricRequest.getFields());
        

Where 2 - should be replaced with uniq ID for each request, is it correct?


icon clock
10 |1500

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

Upvotes
22.1k 59 14 21

Yes, the ID has to be unique in the message:

message.setId(2)
icon clock
10 |1500

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

Upvotes
24.7k 54 17 14

Hello @mario.marchl

Like my colleagues @nick.zincone and @Gurpreet have said, one WebSocket connection can handle multiple subscription streams. You can find more detail about the item subscription with the Real-Time WebSocket API from the following resources:

The example for the batch request (multiple items in a single request) is the "MarketPriceBatchView.java" example available here.

Please note that the example is using the deployed RTDS connection, but the batch logic is the same on the RTO cloud connection.

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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