Click or drag to resize

ISessionSubscribe Method (IEndpoint, ISubscription, Int32, Object)

version: 10.22.0
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).

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

Parameters

endpoint
Type: SolaceSystems.Solclient.MessagingIEndpoint
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
Type: SolaceSystems.Solclient.MessagingISubscription
Only subscriptions of type ITopic are supported
subscribeFlags
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 and WaitForConfirm
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 or SOLCLIENT_OK or SOLCLIENT_IN_PROGRESS
Exceptions
ExceptionCondition
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