question

Upvotes
Accepted
1 0 0 1

Max limit for post id in contribution of message directly contributing to RCC using python websockets

@umer.nalla @Gurpreet

Hi,

We are planning to send the pricing data every 15 sec and the post id is getting incremented for every message we contribute to RCC(i.e we are directly contributing to RCC using python WebSockets)

Could you please let us know the max limit for post id before we need to reset the post id to 0 again?

As we will be reaching this post id number of around 1 Million for continuously sending 24-hour data and we don't have any plan to stop the process and we want to handle this in our code.

If it reaches the maximum limit, then we need to reset it to 0

Regards,

Amit Gupta




websocketsrcc
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
Accepted
15.2k 28 8 12

Hello @amit.gupta

According to the WebSocket API specification (GitHub and Developer Community pages), the PostID attribute type is an integer, so the maximum value is the max integer.

postid.png

However, please note the maximum contributions per second of the WebSocket connection is 1000 updates per second (see this old post)


postid.png (23.7 KiB)
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 1

@wasin.w

Hi Wasin,

Would it be possible to send the duplicate post id in a single connection? let say we send 1 to 100 messages with post IDs in the range from 1 to 100. After 100, we reset the post id to 0 again. Would it create a problem again if we send the same post id 0 in the same login connection or do we need to explicitly log out of this connection?

Regards,

Amit Gupta



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
15.2k 41 12 19

Hi @amit.gupta,

The purpose of the post ID is for your contributing app to keep track of ACK/NAKs for your posts. Once you are fairly far away in the sequence, that there will be no disambiguity in your application, I think it should be ok to reuse the post ID again.

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 1

Great, thanks Gurpreet.

1)Let say if our code is publishing/contributing the data to RCC using python WebSockets, Can it run continuously for 4-5 days or there is any time limit from the server after which the connection needs to be reset from our side or there is no limit.

I mean it that we need to reset the connection after every 10 hours or 20 hours or no limit. Could you please advise on this?



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.

No, there is no time limit enforced by Refinitiv.
Upvotes
1 0 0 1

@Gurpreet Thanks and really appreciate your answer.

We have noticed one pattern that after we start contributing to refinitiv server(positing directly to RCC using python web sockets), we are getting this error

Websocket report: It get stuck up at "web_socket_app.send(json.dumps(login_json))" in the code given shared by refinitiv after 10-12 hours or maybe 8 hours of continuous run. Is there any reason behind it as we have not explicitly closed the session using logout JSON or closed the session.

Could you please advise this and any help will be appreciated

def send_login_request(auth_token, is_refresh_token):
    """
        Send login request with authentication token.
        Used both for the initial login and subsequent reissues to update the
        authentication token
    """
    login_json = {
        'ID': 1,
        'Domain': 'Login',
        'Key': {
            'NameType': 'AuthnToken',
            'Elements': {
                'ApplicationId': '',
                'Position': '',
                'AuthenticationToken': ''
            }
        }
    }

    login_json['Key']['Elements']['ApplicationId'] = app_id
    login_json['Key']['Elements']['Position'] = position
    login_json['Key']['Elements']['AuthenticationToken'] = auth_token

    # If the token is a refresh token, this is not our first login attempt.
    if is_refresh_token:
        login_json['Refresh'] = False

    web_socket_app.send(json.dumps(login_json))



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.

What error?


For the sake of clarity, its best to keep one post for single issue only, and start a new question for a different one.