Solclient
IMessageDispatcherUnsubscribe Method |
Removes an IDispatchTarget subscription from the given IMessageDispatcher.
Note: To use this feature, the parent ISession's SessionProperties must have TopicDispatch set to true.
Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
ReturnCode Unsubscribe( IDispatchTarget dispatchTarget, int flags, Object correlationKey )
Function Unsubscribe ( dispatchTarget As IDispatchTarget, flags As Integer, correlationKey As Object ) As ReturnCode
ReturnCode Unsubscribe( IDispatchTarget^ dispatchTarget, int flags, Object^ correlationKey )
Parameters
- dispatchTarget
- Type: SolaceSystems.Solclient.MessagingIDispatchTarget
- flags
- Type: SystemInt32
Possible values are: 0, this signals to the API not to request or wait for a confirmation. One or more flags from SubscribeFlag ORed. Valid flags are RequestConfirm, WaitForConfirm and LocalDispatchOnly. If LocalDispatchOnly is used, it should be the only flag in the set. - correlationKey
- Type: SystemObject
If subscribeFlags is RequestConfirm, client applications can specify a non-null correlationKey object reference which is returned to the application as a CorrelationKey field within a SessionEventArgs event.
Return Value
Type: ReturnCodeSOLCLIENT_WOULD_BLOCK, if the operation cannot be accepted by the API immediately, SOLCLIENT_OK if successful, or SOLCLIENT_IN_PROGRESS if in progress.
Exceptions
Exception | Condition |
---|---|
OperationErrorException |
Thrown when the Unsubscribe operation fails. More details are available in the fields
of the OperationErrorException.
Possible sub-codes:
|
ObjectDisposedException | Thrown when the session is already disposed (terminal state). |
FatalErrorException | Thrown when an unrecoverable error occurs. |
ArgumentNullException | Thrown if dispatchTarget is null. |
See Also