ITransactedSessionCreateFlow(FlowProperties, IEndpoint, ISubscription, EventHandlerMessageEventArgs, EventHandlerFlowEventArgs, EndpointProperties) Method
Creates a consumer flow
IFlow on the given transacted session.
If messageEventHandler delegate is provided, messages received on the flow are dispatched
to the message callback delegate in the context of the message dispatcher thread
(
CreateMessageDispatcher),
otherwise messages received on this consumer flow are queued internally; in this case
client applications must call
ReceiveMsg(Int32) directly to retrieve any
internally queued messages.
Unlike other (or non-transacted) flows, events and messages received on a transacted flow
are delivered in the contexts of two different threads. Events received on flows are still
delivered in the context of the IContext thread (
IContext). Messages received on
flows are dispatched to the messageEventHandler delegate in the context of the message dispatcher
thread or retrieved by calling
ReceiveMsg(Int32) directly in the context of an
application thread.
The following flow properties are not supported:
AckModeAutoAckNamespace: SolaceSystems.Solclient.MessagingAssembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.26.0
IFlow CreateFlow(
FlowProperties flowProperties,
IEndpoint endpoint,
ISubscription subscription,
EventHandler<MessageEventArgs> messageEventHandler,
EventHandler<FlowEventArgs> flowEventHandler,
EndpointProperties endpointProperties
)
- flowProperties FlowProperties
- The flow properties FlowProperties
- endpoint IEndpoint
- The IEndpoint instance to bind the new IFlow to
- subscription ISubscription
- Only valid if endpoint is of type ITopicEndpoint.
- messageEventHandler EventHandlerMessageEventArgs
- The message EventHandler delegate for receiving messages. May be set to null to receive messages synchronously
- flowEventHandler EventHandlerFlowEventArgs
- The flow event EventHandler delegate
- endpointProperties EndpointProperties
- Is endpoint is a non-durable endpoint, endpointProperties will allo the user
to sepcify EndpointProperties of the implicitly created endpoint
IFlow
A newly created IFlow instance for the transacted session if successful.
OperationErrorException |
Thrown when the operation fails.
Possible sub-codes:
|
ObjectDisposedException |
Thrown when the session is already disposed (terminal state).
|
ArgumentNullException |
Thrown if any of the required parameters is null.
|
FatalErrorException |
Thrown when an unrecoverable error occurs.
|
ArgumentException |
Thrown if arguments fail validation.
|