IMessageDispatcher.Subscribe Method

Solclient

IMessageDispatcherSubscribe Method
version: 7.2.1.27
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: 7.2.1.27 (7.2.1.27)
Syntax
ReturnCode Subscribe(
	IDispatchTarget dispatchTarget,
	int flags,
	Object correlationKey
)
Function Subscribe ( 
	dispatchTarget As IDispatchTarget,
	flags As Integer,
	correlationKey As Object
) As ReturnCode
ReturnCode Subscribe(
	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: 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.
Exceptions
ExceptionCondition
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