The Lab

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »



Every trading message sent from the Whisperer application to the Customer Application has a sequence number. The Whisperer application maintains a running sequence number for every feed and MFAPI user. The sequence number for each (user, feed) pair begins at 0 and is incremented by one with every trading message sent by the feed to the user. The sequence number is reset on a weekly basis (over the weekend).

A Customer Application may choose to replay trading messages at any time. The sequence number for a Customer Application persists through disconnects. The number could be retrieved by calling getSequenceID(feedID) once the Customer Application has been successfully subscribed (after receiving SubscriptionEventMessage with status enabled). -2 means the last sequence number is unknown, it is returned if not subscribed yet. -1 means there are no trading messages.

An example of a situation where a customer would request a replay is if the customer application becomes disconnected. Upon reconnection, it would request a replay for missed messages beginning with last sequence number stored. This can be done by calling replay(X, n+1, -1), where n is the last sequence number that the Customer Application received from feed X. This sequence number would need to be stored by the Customer Application, and it would need to call replay() for each feed it may have missed messages from.

Each replay request will result in either a message replay or a replay rejection. The end of a replay is conveyed with a ReplayDone message with status ReplayStatus.DONE.

The replay rejection is also conveyed with the ReplayDone message but with status ReplayStatus.REJECTED. Below are reasons why a replay request would be rejected:


• Replay request sent when the client is not subscribed.

• Replaying a fixed interval (from and to sequence number). This is no longer supported.

• Replay request sent while the client is in replay mode.

• Replay request containing more than 1000 messages. This value is fixed in the Whisperer configuration. (This limitation may go away in newer Whisperer versions)

Note

The reason for the Replay limitation is to prevent the MFClient from processing an excessively large request (as the messages must be recovered from a message store), placing a burden on the ability of the MFClient to transport concurrent Marketdata.

 





Figure 8.11. – Replay sequence

  • No labels