Internal Emit Service (com.ibi.agents.XDInternalEmitAgent)

Syntax:

com.ibi.agents.XDInternalEmitAgent

iIT Service Object:

emit: Internal Emit Agent

Description:

This service is used to send a message to an internal queue. The message is marshaled with its context and placed on the queue for execution by the internal queue listener and channel. The messages are picked up from the queue to be processed in the order they arrived. Messages can be intermixed where appropriate with pending messages that are waiting to be processed.

Parameters:

Parameter

Description

Queue Name *

The name of the internal queue that is serviced by an internal queue listener. The queue is created when the channel is started and exists as long as the server is running.

Want User Registers

If set to true, user-type registers are passed to the destination queue. DOC and HDR registers are always transferred with the message. By default, this parameter is set to false.

Priority

Determines the relative priority of the message. Use this parameter to reorder the execution of messages. Only the relative numbers matter. Higher numbers do not execute messages faster, only the acquisition order by the internal channel is affected. By default, this parameter is set to 4.

Put Timeout

Determines the amount of time that the emit will wait for the internal channel to accept the message. If the destination 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 Chapter 1, Introducing iWay Service Manager in the iWay Service Manager User's Guide.

Request Context Namespace

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

Response Context Namespace

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

Return *

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

  • status (default). 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.
  • response. The response from the execution through the internal channel is returned. When response is set, the emitter waits for the response from the internal channel, making this a synchronous call.

Avoid Preemitter

Determines whether any preemitter should be avoided. Select one of the following options from the drop-down list:

  • true (default)
  • false

Respect Transactionality

Determines whether this emitter should post messages regardless of the commit or rollback state of the transaction. For example, you may not want to respect transactionality when passing messages that reflect the progress of an application or errors within the application. By default, this parameter is set to true.

Call at EOS?

In a streaming environment, EOS (End of Stream) is the short message that is sent after the last document, which signifies the EOS. This parameter determines whether this service should be called for the EOS message. By default, this parameter is set to false.

Timeout

Determines how many seconds to wait for a synchronous response. Set to 0 or leave blank to wait indefinitely.

Edges:

The edges returned are listed in the following table.

Edge

Description

success

The message was enqueued for execution by the listener and channel that is servicing the destination queue.

fail_parse

The iFL used to configure this service contained an error.

fail_notfound

The queue was not available.

timeout

The message could not be placed onto the destination queue in the time period specified in the Put Timeout parameter. This signifies that the queue was inhibited and could not receive messages.

cancelled

A cancel order was received while the service was in operation.

fail_operation

The message could not be marshaled or could not be enqueued for some other reason.

notfound

The queue was not available. In some applications this may not be considered an error, so this edge is provided along with the fail_notfound edge.

Example:

In a sample use case, an Internal Emit service is used to forward incoming documents to an internal queue. The architecture for this use case consists of two channels. The first channel feeds incoming documents to the internal queue and the second channel is used to process the internal queue. The first channel also contains a route that is associated with a process flow where an Internal Emit service is used. For example:

Every time an incoming document is processed by the first channel, the document is added to the internal queue, for example, queue1. The second channel contains an inlet that is associated with an Internal listener to access queue1. For example:

The second channel also contains a Move route, which routes the documents that reside on queue1 to the appropriate outlet. This outlet can consist of a File or Email Emitter. For example:

As documents are picked up by the first channel, they are processed by the first channel and then by the second channel. When the processing is finished, the documents will appear at the final location, which is specified by the second channel's emitter. For example: