Click or drag to resize

IMessageDispatcherCreateDispatchTarget Method

version: 10.22.0
Creates a IDispatchTarget instance to be used in the Subscribe(IDispatchTarget, Int32, Object) and Unsubscribe(IDispatchTarget, Int32, Object) methods.

Note: Client applications must keep IDispatchTarget object references accessible if they want to Unsubscribe from the given IMessageDispatcher, and remove already added Topic subscriptions. IDispatchTarget internal object ID constitutes a unique key. Forgetting to keep a reference to IDispatchTarget objects make subsequent Unsubscribe(IDispatchTarget, Int32, Object) calls impossible.

Namespace:  SolaceSystems.Solclient.Messaging
Assembly:  SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.22.0
Syntax
C#
IDispatchTarget CreateDispatchTarget(
	ISubscription subscription,
	EventHandler<MessageEventArgs> messageCallback
)

Parameters

subscription
Type: SolaceSystems.Solclient.MessagingISubscription
An ITopic instance.
messageCallback
Type: SystemEventHandlerMessageEventArgs
The callback delegate to dispatch matching messages to.

Return Value

Type: IDispatchTarget
Returns a IDispatchTarget instance
Exceptions
ExceptionCondition
ObjectDisposedException Thrown when the session is already disposed (terminal state).
ArgumentNullException Thrown if subscription or messageCallback are null.
ArgumentOutOfRangeException
See Also