question

Upvotes
Accepted
1 0 0 0

Seq Number reset in Websocket API for Price Streaming

We consulted the documentation provided on your site regarding the functionality and setup. However there is a bit of additional clarification required: All the messages received via Websocket have a Sequence number. The definition in the documentation is relatively vague: Sequence number intended to help with temporal ordering. Typically, this will be incremented with every message, but may have gaps depending on the sequencing algorithm being used. As a general approach for this protocol such a message is used so that the receiver may decide whether a received message is relevant in a given context. These messages are not guaranteed to be received in the actual sending order, therefore this Sequence number would have the role of ordering the messages in that scope. The problem that we encountered is that this Seq Number seems to be resetting to 0(zero) at any point in the day as it reaches 65535, behavior that makes the assumed functionality unusable.

How can we have a clean behavior in regard to Seq Number?

thank you

trepsequence
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.

1 Answer

Upvote
Accepted
32.2k 40 11 19

Hello @doris.wagner01 ,

In RDM Guide definition:

"SeqNum Optional. A user-specified, item-level sequence number which can be used by the application for sequencing messages within this stream"

You are absolutely correct, in how SeqNum from Refinitiv Realtime service is implemented- up to 65k and back to 0, the ordering/sequencing is intended to be short-term and SeqNum is not guaranteed to be present in every message, is up to the service/the publisher; on an item originating with a custom publisher the behavior may potentially differ.

SeqNum is not associated with this specific item subscription from the connection and the consumer, but rather with the published item, and all subscribers to the item from the same source will be receiving the same sequence number, as another very important use case, in my view, is in a custom redundancy solution.

Hope this information helps

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.