Configuring an Ordered Emit Service

How to:

Reference:

The Ordered emit service is used to send a message to a group that is managed by an ordered queue. The document is marshaled with its context and then placed on the queue to be executed by the Ordered Queue listener and channel. The characteristics of message management and sequencing are controlled by the Ordered Queue listener and channel. The use of ordered queues is similar to the use of internal queues, which provide no ordering. For more information, see Configuring Internal Queue Processing.

To configure an Ordered emit service, you must create a process flow for your application project using iWay Integration Tools (iIT) and use the Queue Out object to emit to the Ordered Queue (iWay queue (ordered) - send a message). Note that the Queue Out object implements Ordered Queue operations using com.ibi.agents.XDOrderedEmitAgent.

For a complete description of the configuration parameters that are available for the Ordered emit service, see Ordered Emit Service Parameters.

For a complete description of the edges that are returned by the Ordered emit service, see Ordered Emit Service Edges.

Procedure: How to Configure an Ordered Emit Service

To configure an Ordered emit service, you must create a process flow in your application project using iWay Integration Tools (iIT) and use the Queue (Out) object from the Palette, under Connectors, to emit to the ordered queue (iWay queue (ordered) - send message) action.

Note: The Queue Out object implements the iWay queue (ordered) - send message action using the Ordered emit service (com.ibi.agents.XDOrderedEmitAgent).

  1. Expand the Connectors category in the Palette and drag the Queue (Out) object to your process flow, as shown in the following image.
  2. In the Properties tab, under Configuration, select iWay queue (ordered) - send message from the Select Action drop-down list, as shown in the following image.
  3. Click the Create a configuration icon to the right of the Configuration field to configure a new generic for this object, as shown in the following image.

    The New Generic dialog box opens, as shown in the following image.

  4. Specify a name for this generic in the Generic Name field, or accept the default.
  5. In the Queue Settings tab, specify values for the following configuration parameters:
    • Name. Name of the ordered queue that is serviced by an Ordered Queue listener. The queue is created when the channel is started and exists as long as the server is running.
    • Put Timeout. Determines the amount of time that the emit will wait for the ordered channel to accept the message. If the ordered queue is inhibited, the emit is paused until the message can be accepted. If the timeout period expires, a status message is sent down the timeout edge, where your application might chose to pend the message. For more information on using inhibition to provide cascading flow congestion management, see the Introducing iWay Service Manager chapter in the iWay Service Manager User's Guide. If no value is supplied, timeout is set to 3000 milliseconds.

    The Registers (Sent) tab is shown in the following image.

    By default, the Apply parameter is set to false. If set to true, user-type registers are passed to the ordered queue. DOC and HDR registers are always transferred with the message. By specifying a value for the Namespace parameter in this tab, registers in that namespace will be sent to the ordered queue. This is used to limit the registers to those of interest to the message process.

    The Registers (Returned) tab is shown in the following image.

    The Namespace parameter in this tab is used only for synchronous emits. If set, registers returned from the ordered channel are placed into the specified namespace.

  6. Click Finish.

    You are returned to the Properties tab.

  7. Expand Message, as shown in the following image.
  8. Specify values for the following configuration parameters:
    • Type. Classification of the message that is being sent to the ordered queue. Select one of the following message types from the drop-down list:
      • Delete {del}. The batch queue is to be deleted. Has no effect for an immediate queue.
      • Document {doc}. The current document message is to be enqueued for its group key. This is the default value.
      • Last Document {docend}. Affects a document and end operation. Signals that this message is the final message and the queue is to be made available for dispatching.
      • End Signal {end}. The final message has been enqueued for this group, and the batch queue is to be made available for dispatching. Has no effect for an immediate queue.
      • Keep Alive {keepalive}. Resets the timeout period for a batch queue. Has no effect for an immediate queue.

    • Group Key. Identifies the group for this message. Groups are created in the ordered queue when a new key is presented, and are deleted when the last message for that group has completed execution.
    • Sort Key. Applied only for non-chronological batching queues. Passes the key to be used for the intra-batch sorting. Usually this will be an iFL statement extracting some value from the message itself, such as a sequence number.
  9. Expand Queue Settings, as shown in the following image.
  10. Specify a value for the following configuration parameter:
    • Respect Transactionality. Determines whether to respect existing transactionality. The default value is true.
  11. Expand Post Action, as shown in the following image.
  12. Specify a value for the following configuration parameter:
    • Return. Select one of the following options from the drop-down list:
      • response. The response document will be the output document. This is the default value.
      • status. A status document is returned showing the success of the queuing operation.
      • input. The input document that originally came into the emit service is returned.
  13. Save your process flow.

Reference: Ordered Emit Service Parameters

The following table lists and describes parameters for the Ordered emit service.

Note: Parameters that are common to emit services are described in Service Configuration Parameters.

Parameter

Description

Queue Name (required)

Name of the ordered queue that is serviced by an Ordered Queue listener. The queue is created when the channel is started and exists as long as the server is running.

Group Key (required)

Identifies the group for this message. Groups are created in the ordered queue when a new key is presented, and are deleted when the last message for that group has completed execution.

Message Type

Classification of the message that is being sent to the ordered queue. Select one of the following message types from the drop-down list:

  • Delete {del}. The batch queue is to be deleted. Has no effect for an immediate queue.
  • Document {doc}. The current document message is to be enqueued for its group key. This is the default value.
  • Last Document {docend}. Affects a document and end operation. Signals that this message is the final message and the queue is to be made available for dispatching.
  • End Signal {end}. The final message has been enqueued for this group, and the batch queue is to be made available for dispatching. Has no effect for an immediate queue.
  • Keep Alive {keepalive}. Resets the timeout period for a batch queue. Has no effect for an immediate queue.

Sort Key

Applied only for non-chronological batching queues. Passes the key to be used for the intra-batch sorting. Usually this will be an iFL statement extracting some value from the message itself, such as a sequence number.

Want User Registers

If set to true, user-type registers are passed to the ordered queue. DOC and HDR registers are always transferred with the message. The default value is false.

Put Timeout

Determines the amount of time that the emit will wait for the ordered channel to accept the message. If the ordered queue is inhibited, the emit is paused until the message can be accepted. If the timeout period expires, a status message is sent down the timeout edge, where your application might chose to pend the message. For more information on using inhibition to provide cascading flow congestion management, see the Introducing iWay Service Manager chapter in the iWay Service Manager User's Guide.

If no value is supplied, timeout is set to 3000 milliseconds.

Request Context Namespace

By specifying a namespace, registers in that namespace will be sent to the ordered queue. This is used to limit the registers to those of interest to the message process.

Return (required)

Select one of the following options from the drop-down list:

  • status. A status document is returned showing the success of the queuing operation.
  • input. The input document that originally came into the emit service is returned.

The default value is status.

Response Context Namespace

This parameter is used only for synchronous emits. If set, registers returned from the ordered channel are placed into this namespace.

Reference: Ordered Emit Service Edges

The following table lists and describes the edges that are returned by the Ordered emit service.

Edge

Description

OnSuccess

Operation was successful.

OnFailure

Fail condition occurred during execution.

OnError

Exception occurred during execution.

OnParseError

Could not parse a document.

OnNotFound

Resource was not found. This may or may not be a failure.

OnTimeOut

Operation timed out.

OnCancelled

Service has responded to a cancellation request.

OnNotFound

Resource was not found and this is considered an error.

OnFailedOperation

Could not perform the operation requested.