The Lab

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Each subscription (for both market data and trading) is always acknowledged with a SubscriptionEventMessage message sent from the Whisperer.

SubscriptionEventMessage messages are received asynchronously via the onSubscriptionEvent() callback on the handler interface. The Customer Application should expect to receive an acknowledgement for each subscription request it makes.
 

SubscriptionEventMessage messages can convey three possible subscription states, based on the value of the status field:

• Where status is set to ENABLED, meaning that the Customer Application's subscription request was successful.


• Where status is set to DISABLED, meaning that the Customer Application's subscription is no longer active. This can result only from the Customer Application un-subscribing from the Feed / Market.


• Where status is set to ERROR, meaning that an error occurred and the subscription is no longer active. The error is indicated in the reason field of the SubscriptionEventMessage.

The following is an example of the sequence of messages where a Customer Application subscribes to market data:

 

Figure 8.7. – Successful market data subscription.


The following is an example of the sequence of messages where a Customer Application unsuccessfully subscribes to trading:

SubscriptionEventMessage messages where status is set to ERROR are triggered when the Whisperer server loses a connection to a Trading Venue. All subscriptions to the affected Trading Venue are disabled. (For example, certain Trading Venues close temporarily at the end of their (For example, certain Trading Venues close temporarily at the end of their trading day.This would trigger the generation of a SubscriptionEventMessage message with the status field set to ERROR.

If a Customer Application receives a SubscriptionEventMessage message with the status field set to ERROR then it must resubscribe to the affected Feed / Market combinations – this holds both for market data and trading subscriptions. 

The following is an example of the sequence of messages where a Customer Application’s market data subscription becomes temporarily disabled, and it must resubscribe: The Customer Application can configure its own resubscription logic or it can use Sticky Subscriptions, described in the next section. (It is important to note that if custom resubscription logic is implemented, the resubscription attempts should be configured to at least 30-second intervals.)




Figure 8.8. – Unsuccessful trading subscription.The SubscriptionEventMessage passed to .onSubscriptionEvent() would have the status field set to ERROR, and the reason field the venue message, for example, "Trading not allowed, please contact prime broker."






Figure 8.9. – Temporarily disabled market data subscription.

Trading day; This would trigger the generation of a SubscriptionEventMessage message with the status field set to ERROR

If a Customer Application receives a SubscriptionEventMessage message with the status field set to ERROR then it must re-subscribe to the affected Feed / Market combinations – this holds both for market data and trading subscriptions..