Queue error

Use the properties in this group to define a local or remote error queue.

For source queues (output links), the connector uses the error queue to prevent messages from remaining on the source queue if the connector rolls back the transaction. For target queues (input links), the connector can use the error queue as a backup target queue for messages that fail to be sent to the target queue.

For output links, this property is available only if you set Message read mode to Delete (under transaction). This value specifies that the failed messages are removed from the source queue after they have been rolled back by the connector. Then the failed messages are moved to the error queue. If you set Message read mode to Delete, the messages are automatically removed from the queue. No rollback is possible. If you set Message read mode to Keep, the messages remain on the source queue after the job has failed.

You can also use the reject link to handle failed messages for input links only.

The default value for this property is No.

You can configure an error queue to hold messages that were not delivered to the output link or put on the target queue.

When the WebSphere® MQ connector reads a message and then deletes it from the source queue but fails to deliver the message to the output link, the message is rolled back on the queue, assuming that the Usage > Message read mode property is set to Delete (under transaction). The message in error and any other messages that were read from the queue in the same transaction are all rolled back. To specify a separate queue, referred to as an error queue, on the queue manager and configure the connector to move the rolled-back messages to the error queue, you set the Usage > Error queue property to Yes and enter the name of the error queue in the Usage > Error queue > Queue name property.

Another scenario for using the error queue is when the connector fails to put a message on the target queue. In this case, if an error queue is specified, the connector tries to put the message on the error queue within the same transaction instead of automatically rolling back the transaction. If the connector successfully puts the message on the error queue, the connector continues processing data and does not roll back the transaction. In other words, the error queue acts as a backup queue that holds messages that cannot be put on the target queue. To configure the connector to put messages on the error queue, you must grant put authorization for the error queue.

In addition, you can configure the connector to preserve the identity context and origin context fields from the original message header; otherwise, the queue manager produces new default values for the fields. To preserve the identity context field values from the original message, you set the Usage > Error queue > Context mode property to Set identity and grant the setid authorization for the error queue and for the queue manager that hosts the error queue.

When the connector is used in Client mode, the error queue does not need to reside under the same queue manager as the main queue to which the connector is putting messages or from which it is reading messages. You specify the name of the queue manager for the error queue in the Usage > Error queue > Queue manager property. It is not possible to specify a client-channel definition for the connection to this queue manager. Instead, you use the environment variable MQSERVER, or you use the MQCHLLIB and MQCHLTAB environment variables.

If the error queue is a remote definition queue, WebSphere MQ moves the messages that the connector places on the remote queue definition in the connected queue manager to the actual error queue on the remote queue manager.

1 Звезда2 Звезды3 Звезды4 Звезды5 Звезд (Пока оценок нет)

Добавить комментарий