10.24.0

ISessionUnsubscribe(IEndpoint, ISubscription, Int32, Object) Method

Remove a ITopic subscription from the endpoint if the operation is supported on the endpoint (Only endpoint of type IQueue supports this operation).

Definition

Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.24.0
C#
ReturnCode Unsubscribe(
	IEndpoint endpoint,
	ISubscription subscription,
	int subscribeFlags,
	Object correlationKey
)

Parameters

endpoint  IEndpoint
The endpoint to remove the subscription from
subscription  ISubscription
Only subscriptions of type ITopic are supported
subscribeFlags  Int32
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  Object
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

ReturnCode
SOLCLIENT_WOULD_BLOCK or SOLCLIENT_OK

Exceptions

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