MSMQ - Queue Exists

Declaration

<AMMSMQ REMOTEMACHINE="text" QUEUENAME="text" TRANSACTIONAL="YES/NO" RESULTDATASET="text (dataset name)" />

See Also

MSMQ - Delete Queue | MSMQ - Retrieve Message | MSMQ - Send Message | MSMQ - Wait for Message | MSMQ - Clear Queue

Description

Determines whether a specific queue exists on the local machine or on a remote machine and populates an AutoMate variable with the results. If the queue exists, this activity returns TRUE. Otherwise, it returns FALSE.

IMPORTANT: MSMQ must be installed on the (local or remote) system in order for these activities to function properly. MSMQ is bundled with Microsoft Windows 2000, Windows XP (excluding Home Edition), Windows Server 2003, Windows Vista and Windows 7 operating systems, however, they are not installed by default. For more details regarding the installation of MSMQ, see MSMQ Installation & Overview.

Practical Usage

Ideally used as a conditional step that can perform different actions depending on whether the condition results to TRUE or FALSE. For example, if this activity returns TRUE, execute steps to send messages to the existing queue. If FALSE, execute steps to create a new queue in which to store new messages.

Parameters

Queue Properties

Property

Type

Required

Default

Markup

Description

Local Machine

---

---

---

---

If enabled, specifies that this activity will be performed on the local machine as opposed to a remote machine (enabled by default). If this parameter is selected, the Remote Machine parameter is ignored. This is considered a design-time parameter used during task development, therefore, it contains no markups.

Remote Machine

Text

No

(Empty)

  1. REMOTEMACHINE="CompName"

  2. REMOTEMACHINE="xxx.xxx.xxx.xxx

If enabled, specifies the host name or IP address of the remote machine that this activity will be performed on. If this parameter is enabled, the Local Machine parameter is ignored.

Queue Path

Text

Yes

(Empty)

QUEUENAME="CompName\QueueName"

The full path and name of the message queue. The message queue name consists of the computer name, an optional PRIVATE$ keyword that indicates whether it is a private queue and the name of the queue. See examples below:

Public queue sample: ComputerName\QueueName

Private queue sample: ComputerName\PRIVATE$\QueueName

Populate AutoMate variable with result

Yes/No

No

No

PRIVATE="YES"

The name of the variable in which to populate with the results of this activity.

 

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description:

 

↑ Top of Page