Click or drag to resize
Subscription Class
A Subscription object holds information about a subscription for topic updates and comprises of two primary fields: a 'CorrelationId' associated with the subscription, and a string, called a subscription string, describing the data to be delivered as a part of the subscription.
Inheritance Hierarchy
SystemObject
  Bloomberglp.BlpapiSubscription

Namespace:  Bloomberglp.Blpapi
Assembly:  Bloomberglp.Blpapi (in Bloomberglp.Blpapi.dll) Version: 3.19.2.1
Syntax
public class Subscription

The Subscription type exposes the following members.

Constructors
  NameDescription
Public methodSubscription(String)
Create a Subscription object with the specified subscription string. Subscription(String, CorrelationID)
Public methodSubscription(String, CorrelationID)
Initializes a new instance of the Subscription class
Public methodSubscription(String, Boolean)
Creates a Subscription object with the specified subscriptionString, and the specified isResolved flag and an internally generated CorrelationID . If the isResolved is set to true, the subscriptionString is assumed to be a fully-resolved topic string. Note that even if isResolved flag is true, it is still at the discretion of each function operating on Subscription to perform resolution (again) on this topic or not.
Public methodSubscription(String, IListString)
Public methodSubscription(String, String)
Creates a Subscription object with the specified security and fields with no options and an internally generated CorrelationID.
Public methodSubscription(String, CorrelationID, Boolean)
Creates a Subscription object with the specified subscriptionString, the specified correlationID for correlation, and the specified isResolved flag. If the isResolved is set to true, the subscriptionString is assumed to be a fully-resolved topic string. Note that even if isResolved flag is true, it is still at the discretion of each function operating on Subscription to perform resolution (again) on this topic or not.
Public methodSubscription(String, IListString, CorrelationID)
Creates a Subscription object with the specified security, fields and correlationId.
Public methodSubscription(String, IListString, IListString)
Creates a Subscription object with the specified security, fields and options.
Public methodSubscription(String, String, CorrelationID)
Creates a Subscription object with the specified security and fields with no options and the specified correlationId.
Public methodSubscription(String, String, String)
Creates a Subscription object with the specified security, fields and options and an internally generated CorrelationID.
Public methodSubscription(String, IListString, IListString, CorrelationID)
Initializes a new instance of the Subscription class
Public methodSubscription(String, String, String, CorrelationID)
Creates a Subscription object with the specified security, fields, options and correlationId.
Top
Properties
  NameDescription
Public propertyCorrelationID
Public propertyIsResolved
Returns true if the object was created with the isResolved flag set for the topic string, otherwise returns false.
Public propertySubscriptionStatus Obsolete.
Return the subscription status.
Public propertySubscriptionString
Subscription string
Top
Methods
  NameDescription
Public methodToString
Return the string representation of this object.
(Overrides ObjectToString.)
Top
Remarks
The simplest form of a subscription string is a fully qualified subscription string, which has the following structure:
"//blp/mktdata/ticker/IBM US Equity?fields=BID,ASK&interval=2"
 \-----------/\------/\-----------/\------------------------/
       |          |         |                  |
    Service     Prefix   Instrument          Suffix
Such a fully-qualified string is composed of:
  • Service Identifier: a string matching the expression ^//[-_.a-zA-Z0-9]+/[-_.a-zA-Z0-9]+$, e.g. //blp/mktdata.
  • Prefix: a string matching the expression /([-_.a-zA-Z0-9]+/)?, often used as a symbology identifier.
  • Instrument: a non-empty string that does not contain the character? (i.e. a string matching [^?]+) e.g. "IBM US Equity", or "SPX Index". The service, prefix, and instrument together uniquely identify a source for subscription data.
  • Suffix: a suffix contains a question mark followed by a list of options which can affect the content delivery. The format of these options is service specific, but they generally follow URI query string conventions: a sequence of "key=value" pairs separated by "&" characters.Further, many common services follow the convention that the value given for the 'fields' key is formatted as a comma-separated list of field names.BLPAPI provides several convenience functions to assist in formatting subscription strings for services that make use of these conventions.
Note that subscription strings need not be fully qualified: BLPAPI allows the service and prefix to be omitted from subscription strings, and automatically qualifies these strings using information stored in a 'Session' object. It is used to create a list of Subscription objects that can be used for Subscribe(), Resubscribe(), and Unsubscribe() requests.
See Also