ISessionCreateFlow Method (FlowProperties, IEndpoint, ISubscription, EventHandlerMessageEventArgs, EventHandlerFlowEventArgs)
The message receive delegate is invoked for each received message on this flow. The flow event delegate is invoked when flow events occur, such as the flow going up or down. Both delegates are invoked in the context of the context thread to which this session belongs.
Note: disposing the corresponding context (IContext) or any of its contained context timers (TimerTask), sessions (ISession) or flows (IFlow) must not be performed from within the registered delegates (messageEventHandler or flowEventHandler).
An endpoint is a holding area which allows a client to attract Guaranteed messages matching a given subscription to a destination. There are two types of endpoints: "durable" and "non-durable". Durable in this context means that the client that is bound to the given endpoint does not have to be online to attract messages. Non-durable endpoints are disposed when the bound client disconnects.
A destination can be either temporary or non-temporary. A temporary destination is used as a "reply to" field in request/reply message exchange patterns. Wildcard subscription capabilities do not apply to temporary destinations.
With the exception of durable endpoint with temporary destination, the following cases are supported:
|A flow bound to a non-temporary IQueue.||A non-null IQueue, created by CreateQueue(String)||null|
|A flow bound to a temporary IQueue.||A non-null IQueue, created by CreateTemporaryQueue.||null|
|A flow bound to a non-temporary ITopic and a durable ITopicEndpoint.||A non-null ITopicEndpoint, created by CreateDurableTopicEndpoint(String).||A non-null ITopic, created by CreateTopic(String) or CreateTopic(TopicProperties).|
|A flow bound to a non-temporary ITopic and a non-durable ITopicEndpoint.||A Non-Durable ITopicEndpoint, created by CreateNonDurableTopicEndpoint.||A non-null ITopic, created by CreateTopic(String) or CreateTopic(TopicProperties).|
|A flow bound to a temporary ITopic and a non-durable ITopicEndpoint.||A Non-Durable ITopicEndpoint, created by CreateNonDurableTopicEndpoint.||A non-null ITopic, created by CreateTemporaryTopic or CreateTopic(TopicProperties).|
IFlow CreateFlow( FlowProperties flowProperties, IEndpoint endPoint, ISubscription subscription, EventHandler<MessageEventArgs> messageEventHandler, EventHandler<FlowEventArgs> flowEventHandler )
|OperationErrorException||Thrown when the operation fails. Possible sub-codes:|
|Thrown when the session is already disposed (terminal state).|
|FatalErrorException||Thrown when an unrecoverable error occurs.|
|Thrown if any of the required parameters is null.|
|Thrown if arguments fail validation.|