Before we proceed to Redelivery capability of the FIle Binding Component, it is important to know about the Quality of Service (QOS) attributes. Redelivery is a part of the QOS properties.
The QOS attributes are configured from the Config QoS Properties Editor, accessed from the Composite Application Service Assembly (CASA) Editor.
The following table describes the QOS attributes.
Table 5 QOS Attributes and Their Description
Redelivery is a Quality of Service mechanism that handles message delivery when first-time delivery fails. Redelivery allows you to define the number of attempts that the system makes to deliver a message, the time between attempts, and the final result for an undeliverable message or non-responsive endpoint. Redelivery is configured for a specific connection from the Composite Application Service Assembly (CASA) Editor, by clicking the QoS icon for that connection. This opens the Config QoS Properties for that connection. From the Redelivery Extension section of the editor, configure the Redelivery properties.
If ERROR status is returned for an Inbound message sent by File Binding Component, the BC will attempt to redeliver the message, based on Redelivery QoS settings. For example, a message could have ERROR status if BPEL Service Engine encounters a problem while processing the message.
The Redelivery configuration parameters are:
Max Attempts: Specifies the number of times that the project attempts to re-deliver a message. An error status is returned to the JBI component for each failed attempt.
Wait Time: Specifies the time, in milliseconds, that the project waits between redelivery attempts.
On Failure: Specifies the actions taken and the message destination when the specified redelivery attempts have been exhausted. This parameter has four options: delete, redirect, suspend, and error.
The On Failure parameter has four options: delete, redirect, suspend, and error.
Delete: The delete option specifies that when the final attempt to redeliver the message has failed, the QoS utility deletes the message and returns a Done status to the JBI component, at which time the component proceeds to its next process. The delete option only supports In-Only message exchanges.
Error: The error option specifies that when the final attempt to redeliver the message is exhausted, the providing JBI component will set the endpoint status to "ERROR", and will raise an exception and populate the Error property with it. This option is supported for both In-Only and In-Out message exchanges.
Redirect: The redirect option specifies that after the final attempt to redeliver the message has failed, the QoS utility redirects the message to a user-defined endpoint, such as a “dead-message” folder. Upon successful delivery to the redirect endpoint, the QoS utility returns a Done status to the JBI component, at which time the component proceeds to its next process. The redirect option only supports In-Only message exchanges.
Suspend: The suspend option specifies that when the final attempt to redeliver the message has failed, the JBI component suspends the process instance . This option is only supported if monitoring is enabled in the JBI Component, since the user must use the monitoring tool to resume a suspended instance. This option is supported for both In-Only and In-Out message exchanges.
From the NetBeans IDE Projects window, right-click the Service Assembly node under your composite application, and select Edit from the popup menu.
The CASA Editor opens containing your composite application.
In the CASA Editor, click the QoS icon located on the link between your JBI Module and the WSDL port you want to configure.
The QOS Properties Editor appears.
In the QOS Properties Editor, click the property field for Max Attempts under Redelivery Extension, and enter an integer for the maximum number of redeliveries to be attempted.
Similarly set the Wait Time and On Failure attributes and click Close.