10.26.0

ISessionSubscribe(IEndpoint, ISubscription, Int32, Object) Method

Add a ITopic subscription on the endpoint if the operation is supported on the endpoint (Only endpoints of type IQueue or type IClientName support this operation).

Definition

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

Parameters

endpoint  IEndpoint
The endpoint to add the subscription on (must be of type IQueue or type IClientName). When authorized, a session can add subscriptions to any queue or to other sessions as identified by ClientName.
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 is returned to the application as a CorrelationKey field within a SessionEventArgs event.

Return Value

ReturnCode
SOLCLIENT_WOULD_BLOCK or SOLCLIENT_OK or SOLCLIENT_IN_PROGRESS

Exceptions

OperationErrorException Thrown when the Subscribe operation fails, more information will be available in the OperationErrorException fields. 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