10.26.0

ISessionSubscribe(ISubscription, Boolean) Method

Registers a subscription to the appliance. When the appliance is running SolOS-TR, a Topic is required.

Definition

Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.26.0
C#
ReturnCode Subscribe(
	ISubscription subscription,
	bool waitForConfirm
)

Parameters

subscription  ISubscription
The subscription to subscribe to.
waitForConfirm  Boolean
If true, this call blocks the calling thread until a confirmation is received from the appliance.

Return Value

ReturnCode
SOLCLIENT_WOULD_BLOCK, if the subscription cannot be accepted by the API immediately, or SOLCLIENT_OK or SOLCLIENT_IN_PROGRESS

Exceptions

OperationErrorException Thrown when the Subscribe operation fails. 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