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: 10.24.0
ReturnCode Unsubscribe(
	IDispatchTarget dispatchTarget,
	int flags,
	Object correlationKey


dispatchTarget  IDispatchTarget
flags  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, WaitForConfirm and LocalDispatchOnly. If LocalDispatchOnly is used, it should be the only flag in the set.
correlationKey  Object
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

SOLCLIENT_WOULD_BLOCK, if the operation cannot be accepted by the API immediately, SOLCLIENT_OK if successful, or SOLCLIENT_IN_PROGRESS if in progress.


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