Receiving Messages with the Message Queue Task

Data Transformation Services

Data Transformation Services

Receiving Messages with the Message Queue Task

Use the Message Queue task to retrieve and process a single message after it has been delivered to a queue.

When executed, the Message Queue task scans the queue for the first message that meets the specified filter criteria. If such a message is found, the Message Queue task terminates successfully after processing the message. If no such message is found, the task waits for the first of the following events:

  • An acceptable message arrives.

  • An optionally specified timeout interval expires.

  • Package execution is canceled manually.

If the wait yields an acceptable message, the Message Queue task terminates successfully after processing the message. If not, it fails.

Messages can be removed from the queue on receipt.

Important  If a message, once read, is not removed from the queue, the next time the task executes, the same message will be returned. Any other acceptable messages on the queue remain inaccessible until the first message is removed. If you do not remove a message on receipt, then you must elsewhere create another Message Queue task that does.

Important  A Message Queue task is not allowed to take part in the package transaction. As a result, your package will fail at run time if, in the Workflow Properties dialog box for a Message Queue task, you select the Join transaction if present check box.