Click or drag to resize
SessionSubscribe Method (IListSubscription, Identity, String)
Initiates a request to receive asynchronous updates to the specified topics in the subscriptionList.

Namespace:  Bloomberglp.Blpapi
Assembly:  Bloomberglp.Blpapi (in Bloomberglp.Blpapi.dll) Version: 3.20.3.1
Syntax
public void Subscribe(
	IList<Subscription> subscriptionList,
	Identity identity,
	string requestLabel
)

Parameters

subscriptionList
Type: System.Collections.GenericIListSubscription
A list of subscription strings to subscribe.
identity
Type: Bloomberglp.BlpapiIdentity
The handle to the user for whom this subscription is being initiated.
requestLabel
Type: SystemString
A label that defines a string which will be recorded along with any diagnostics for this operation.

Implements

ISessionSubscribe(IListSubscription, Identity, String)
Exceptions
ExceptionCondition
InvalidOperationException The session is not started.
DuplicateCorrelationIDException The specified correlationId is not unique.
ArgumentExceptionidentity was not created through this Session, or subscriptionList is null or empty, or the SubscriptionString of an entry in the subscriptionList is invalid.
Remarks

Once this has method has returned any subscriptions in the specified subscriptionList which were not given a application generated CorrelationID will have a session generated CorrelationID set. Multiple subscriptions to the same subscriptionString are valid and each will have their own, unique CorrelationID. This method should only be called after the Session has successfully started up. If an exception is thrown none of the subscriptions in the list would have been processed.

If identity is specified then the subscribe request is issued on behalf of the user represented by the handle. Use SendAuthorizationRequest to authorize an user for accessing the specified service.

Upon completion of this request a SUBSCRIPTION_STATUS event will be published for each topic in the subscription list containing a message with the result for one topic. A SubscriptionStarted message will be generated if the subscription was successfully initiated. If the subscription fails for any topic a SubscriptionFailure message containing the failure reason will be generated.

See Also