Skip to main content

Task MSMQ - Delete Message​

The MSMQ - Delete message(s) Task deletes messages from a Microsoft Message Queuing (MSMQ) queue on the Server computer or on a remote computer. Filters select which messages are deleted.

MSMQ - Delete message(s) tab, with the scope, the queue and the filters

The Main settings, Flow, On error, Conditions and TimeOut tabs are the same for every Task; see Job - Tasks.

MSMQ - Delete message(s) tab​

Scope

  • Credential: the Credential the Task runs as when it connects to the queue. Available with Remote MSMQ. A Credential saved earlier is still used after switching to Local MSMQ; see Credentials
  • Local MSMQ (default): the queue is on the Server computer
  • Remote MSMQ: the queue is on another computer
  • Host name: the host name or IP address of the remote computer. Available with Remote MSMQ

Queue

The queue to delete messages from. The journal queue of a private queue is listed as well. Click the refresh button to fill the list with the queues of the selected computer.

Filters

A message is deleted when it matches every checked filter.

  • Label filter: compares the label of the message with the value: Equal (=) (default), Not equal (!=), Contains (=%) or Not contains (!=%)
  • Message filter: compares the body of the message with the value, with the same comparisons as Label filter
  • Date filter: compares the time the message arrived in the queue with the date: Smaller than (<) (default) or Larger than (>). The default date, {DATENOWADD(Days|-7|yyyy-MM-dd)}, is seven days ago
  • Limit and sort direction of date: deletes at most the number of messages entered, "10" by default, taking the oldest first with "Ascending" (default) or the newest first with "Descending"

Each value may contain Variables; click the Variable button next to it.

warning

With no filter checked, every message in the queue is deleted.

Output and errors​

The output is the number of messages deleted, for example "Deleted 3 message(s)". If the queue cannot be read, the Task fails.