C# | Visual Basic | Visual C++ |
public void Subscribe( IList<Subscription> subscriptionList, Identity identity, string requestLabel )
Public Sub Subscribe ( subscriptionList As IList(Of Subscription), identity As Identity, requestLabel As String )
public: void Subscribe( IList<Subscription^>^ subscriptionList, Identity^ identity, String^ requestLabel )
- subscriptionList (IList<(Of <(<'Subscription>)>)>)
- A list of subscription strings to subscribe.
- identity (Identity)
- The handle to the user for whom this subscription is being initiated.
- requestLabel (String)
- A label that defines a string which will be recorded along with any diagnostics for this operation.
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 a identity is specified then the subscribe request is issued on behalf of the user represented by the handle. Use the 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.
Exception | Condition |
---|---|
InvalidOperationException |
The session is not started.
|
DuplicateCorrelationIDException |
The specified correlationId is not unique.
|
ArgumentException |
The specified Identity was not created through this Session.
The specified 'subscriptionList' is null or empty.
|
Assembly: Bloomberglp.Blpapi (Module: Bloomberglp.Blpapi.dll) Version: 3.8.10.1