ISession.Unsubscribe Method (IEndpoint, ISubscription, Int32, Object)

Solclient

ISessionUnsubscribe Method (IEndpoint, ISubscription, Int32, Object)
version: 7.2.1.27
Remove a ITopic subscription from the endpoint if the operation is supported on the endpoint (Only endpoint of type IQueue supports this operation).

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(
	IEndpoint endpoint,
	ISubscription subscription,
	int subscribeFlags,
	Object correlationKey
)
Function Unsubscribe ( 
	endpoint As IEndpoint,
	subscription As ISubscription,
	subscribeFlags As Integer,
	correlationKey As Object
) As ReturnCode
ReturnCode Unsubscribe(
	IEndpoint^ endpoint, 
	ISubscription^ subscription, 
	int subscribeFlags, 
	Object^ correlationKey
)

Parameters

endpoint
Type: SolaceSystems.Solclient.MessagingIEndpoint
The endpoint to remove the subscription from
subscription
Type: SolaceSystems.Solclient.MessagingISubscription
Only subscriptions of type ITopic are supported
subscribeFlags
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 and WaitForConfirm
correlationKey
Type: SystemObject
If subscribeFlags is RequestConfirm, client applications can specify a non-null correlationKey object reference which will be returned to the application as a CorrelationKey field within a SessionEventArgs event.

Return Value

Type: ReturnCode
SOLCLIENT_WOULD_BLOCK or SOLCLIENT_OK
Exceptions
ExceptionCondition
OperationErrorException Thrown when the Unsubscribe operation fails. More details will be 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 subscription is null.
See Also