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.
IDispatchTarget CreateDispatchTarget(
ISubscription subscription,
EventHandler<MessageEventArgs> messageCallback
)
ObjectDisposedException | Thrown when the session is already disposed (terminal state). |
ArgumentNullException | Thrown if subscription or messageCallback are null. |
ArgumentOutOfRangeException |