Click or drag to resize

IMessageDispatcherSubscribe Method

version: 10.22.0
Adds a IDispatchTarget subscription to the given IMessageDispatcher.

Note: In order 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.22.0
ReturnCode Subscribe(
	IDispatchTarget dispatchTarget,
	int flags,
	Object correlationKey


Type: SolaceSystems.Solclient.MessagingIDispatchTarget
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.
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: ReturnCode
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 Subscribe 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