Waiting for engine...
Skip to main content

Clear queue messages operation

Use the Clear queue messages operation to programmatically delete all messages in a Runtime queue for a given Runtime, Runtime cluster, or Runtime cloud.

This action is similar to the Clear Messages action located on Queue Management panel Manage > Runtime Management of the interface.

Structure

<ClearQueueRequest xmlns="http://api.platform.boomi.com/" QueueName="" AtomId="" SubscriberName="" DLQ=""/>
FieldTypeDescription
FilterFilterFilter
AtomIDstringThe unique ID assigned by the system to the container.
The Runtime ID for Runtimes, Runtime clusters, and Runtime clouds is found in the user interface by navigating to Manage > Runtime Management and viewing the Atom Information panel for the selected container.
DLQstringWhen set to true, it deletes messages from the regular queue only.When set to false (default), it deletes messages from the regular queue.
QueueNamestringThe name of the queue or topic. You can locate the queue or topic name by navigating to Manage > Runtime Management > Queue Management panel or by employing the ListQueues API action to retrieve the names of all queues on a given Runtime.
SubscriberNamestringThe subscriber name as it exists on the Runtime. You can find the subscriber name using the ListQueues API action or by looking up the Component ID of the process tied to the subscriber.
Note: The subscriber name does not necessarily equate to the Subscriber Name as is shown in Queue Management.. If there is a process in Queue Management. with the same name, use the Component ID of that process.

Supported operations

GETQUERYCREATEUPDATEEXECUTEDELETE
Not SupportedNot SupportedNot SupportedNot SupportedSupportedNot Supported

Using the EXECUTE operation

  • When you run the Clear queue messages action, it deletes all messages in a queue name from the queue. Note that this clears all messages in the queue; you cannot select and remove individual messages using this action. In addition, the action overrides any purge settings you might configure in the user interface.

  • The immediate response indicates success in passing the request to the Runtime.

  • If the specified Atom queue does not contain any messages to clear, the response only returns a success message stating that the message passed even though there is no action taken on the Runtime.

  • You can use the Get queue list API action to retrieve the number of messages in a queue, which works as an alternative way to check if the clear queue message action succeeded on the Runtime.

SOAP implementation

EXECUTE operation

Send a POST request to https://api.boomi.com/api/rest/v1/<accountId>/ClearQueue/execute/<atomId>

where accountID is the ID of the account authenticating the request and atomId is the ID of the runtime, Runtime cluster, or Runtime cloud.

Sample SOAP request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.platform.boomi.com/">
<soapenv:Header/>
<soapenv:Body>
<api:execute>
<api:objectType>ClearQueue</api:objectType>
<api:objectId>ATOM_ID</api:objectId>
<api:object xsi:type="api:ClearQueueRequest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" QueueName="QUEUE_NAME" AtomId="ATOM_ID" SubscriberName="SUBSCRIBER_ID" DLQ="false"/>
</api:execute>
</soapenv:Body>
</soapenv:Envelope>

Sample SOAP response:

<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
On this Page