# How to empty a queue with 200+ messages?

**URL:** <https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810>\
**Category:** Solace Event Broker\
**Tags:** queue\
**Created:** [June 23, 2021, 12:29pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810 "2021-06-23T12:29:04Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [June 23, 2021, 12:29pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/1 "2021-06-23T12:29:04Z")

</div>

Hi all,  
We are using Solace in combination with Boomi. We’re looking for a solution to empty a queue quickly. No matter how many messages are in that queue.

From the Solace Cloud console, the max is 50 per page. JMS Toolbox is refusing to empty a queue when it contains 200+ messages. How to solve this? Ideally, we would like to have a button in Solace Cloud to do this. For example, today, we have been testing with 3000+ messages. It would take 60 clicks in Solace Cloud to empty the queue. Not really efficient IMO.

Thanks!

---

<div class="post-metadata">

**Author:** ![rlawrence](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/rlawrence/32/1182_2.png) [@rlawrence](https://community.solace.com/u/rlawrence)\
**Post date:** [June 23, 2021, 1:35pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/2 "2021-06-23T13:35:09Z")

</div>

Hi

I believe his feature will be added to the Solace Web UI in a future release. In the meantime, however, you can achieve this using the SEMP V1 API. See an example script [here](https://github.com/richard-lawrence/Solace-SEMP-V1-Scripts).

Hope this helps  
Richard

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/aaron/32/843_2.png) [@Aaron](https://community.solace.com/u/Aaron)\
**Post date:** [June 23, 2021, 1:56pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/3 "2021-06-23T13:56:37Z")

</div>

> _however, you can achieve this using the SEMP V1 API._

Yup, you can do with a single HTTP POST!

Otherwise, you could also just drain the queue with a standard consumer app. But that kind of blurs the line between “messaging app” and “management utility”.

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [June 23, 2021, 7:10pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/4 "2021-06-23T19:10:02Z")

</div>

> [@rlawrence](#):
>
> Hi  
> I believe his feature will be added to the Solace Web UI in a future release. In the meantime, however, you can achieve this using the SEMP V1 API. See an example script [here](https://github.com/richard-lawrence/Solace-SEMP-V1-Scripts).  
> Hope this helps  
> Richard

That’s an acceptable workaround. Btw: what’s the priority of this feature? It’s one of our top 3 admin feature requests in the Solace Cloud UI. Others are

- moving messages from a queue A to B. For example, moving messages from a DMQ to the originating queue
- view message payloads =\> this is the number 1

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [June 23, 2021, 7:14pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/5 "2021-06-23T19:14:45Z")

</div>

> @Aaron said:
> 
> > _however, you can achieve this using the SEMP V1 API._
> 
> Yup, you can do with a single HTTP POST!
> 
> Otherwise, you could also just drain the queue with a standard consumer app. But that kind of blurs the line between “messaging app” and “management utility”.

Thanks Aaron. True! 😄

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [June 23, 2021, 8:38pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/6 "2021-06-23T20:38:04Z")

</div>

> [@rlawrence](#):
>
> Hi  
> I believe his feature will be added to the Solace Web UI in a future release. In the meantime, however, you can achieve this using the SEMP V1 API. See an example script [here](https://github.com/richard-lawrence/Solace-SEMP-V1-Scripts).  
> Hope this helps  
> Richard

Hi Richard,  
I have tried it from Postman using a POST {{url}}/SEMP and the following payload:

```auto
<rpc>
  <admin>
    <message-spool>
      <vpn-name>my VPN</vpn-name>
      <delete-messages>
        <queue-name>my queue</queue-name>
      </delete-messages>
    </message-spool>
  </admin>
</rpc>

```

I get an HTTP 200 OK response, but nothing happens. If I send an invalid XML payload (removing a tag), I still get an HTTP 200. The documentation says:

\_An HTTP response of “200 OK” is returned if the command was accepted by the event broker (even if it was not successfully executed).  
\_

How does the SEMP V1 operation work?

---

<div class="post-metadata">

**Author:** ![rlawrence](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/rlawrence/32/1182_2.png) [@rlawrence](https://community.solace.com/u/rlawrence)\
**Post date:** [June 24, 2021, 9:18am UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/7 "2021-06-24T09:18:00Z")

</div>

It could be an error returned from the broker, such as invalid queue name for example. Try running curl with verbose -v option. Feel free to send me the output in a private message and I can take a look.

In terms of the other requests, there is a tool for resending queue messages, such as from a DMQ, you can try [here](https://github.com/richard-lawrence/Solace-JCSMP-Queue-Resender)

For browsing queues and viewing message payloads, I used SDKPerf with options: -qb -md -q

---

<div class="post-metadata">

**Author:** ![marc](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/marc/32/2191_2.png) [@marc](https://community.solace.com/u/marc)\
**Post date:** [June 24, 2021, 5:23pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/8 "2021-06-24T17:23:18Z")

</div>

> In terms of the other requests, there is a tool for resending queue messages, such as from a DMQ, you can try here

Cool tool @rlawrence! I didn’t know that existed. It might be worth making a separate post in the community about it with a title that folks might google search for so it’s more easily findable. 🙂

---

<div class="post-metadata">

**Author:** ![uherbst](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/uherbst/32/291_2.png) [@uherbst](https://community.solace.com/u/uherbst)\
**Post date:** [June 30, 2021, 11:52am UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/9 "2021-06-30T11:52:25Z")

</div>

I’m missing the cli for that task 🙂

```auto
ena
admin
message-spool message-vpn my_vpn
delete-messages queue my_queue
home
exit

```

(if you compare, that’s the direct translation between SEMP and cli)

The bad thing: There is no easy way to reach cli on a solace-cloud instance ☹

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [May 15, 2023, 12:08pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/10 "2023-05-15T12:08:51Z")

</div>

Hi @rlawrence and @Aaron ,  
Is there an update regarding this feature request for the Solace Cloud UI? Thank you.  
Sjaak

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/aaron/32/843_2.png) [@Aaron](https://community.solace.com/u/Aaron)\
**Post date:** [May 15, 2023, 3:33pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/11 "2023-05-15T15:33:01Z")

</div>

Hey @sjaak ! Welcome back. I’m not sure, I’ll go ask. Actually, I’ll go test…  
Well, good news! This option is now available in my 10.4.0 broker:

 ![image.png](https://canada1.discourse-cdn.com/solace/original/1X/21c938f034f59e121bea0e4389c4dedf4b5f6aba.png)  
Not sure exactly when they added it, would you like to know what the min version is?  
EDIT: it was added in 10.0.1. But never release noted. So it’s been in the product for about half a year now.

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [May 15, 2023, 9:11pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/12 "2023-05-15T21:11:45Z")

</div>

> [@Aaron](#):
>
> Hey @sjaak ! Welcome back. I’m not sure, I’ll go ask. Actually, I’ll go test…  
> Well, good news! This option is now available in my 10.4.0 broker:  
> [https://us.v-cdn.net/6031588/uploads/SUC8AKKFDHLE/image.png](https://us.v-cdn.net/6031588/uploads/SUC8AKKFDHLE/image.png) Not sure exactly when they added it, would you like to know what the min version is?  
> EDIT: it was added in 10.0.1. But never release noted. So it’s been in the product for about half a year now.

HI @Aaron , thanks! Btw: we are using 20+ Solace Cloud services. And Solace is, as we speak, upgrading them to 10.0. ﻿?﻿ The newest service we created last week is 10.2. I don’t know when 10.4 will become available for upgrades.  
It works on 10.0.x Solace Cloud. Cool!

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [May 15, 2023, 9:12pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/13 "2023-05-15T21:12:56Z")

</div>

@Aaron I will check this with support

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [May 15, 2023, 9:27pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/14 "2023-05-15T21:27:43Z")

</div>

A screenshot of a Solace Cloud 10.0.x service

 ![image.png](https://canada1.discourse-cdn.com/solace/original/1X/355c0548b6d3f9e6da7726b738db2c8398b12285.png)

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/aaron/32/843_2.png) [@Aaron](https://community.solace.com/u/Aaron)\
**Post date:** [May 16, 2023, 2:16pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/15 "2023-05-16T14:16:50Z")

</div>

Nice! For completeness, this feature was added in 10.0.1, but it’s not in 10.0.0. The latter would have been a Preview release anyway, and Solace Cloud would not upgrade to that. 10.0.1 is an LTS version. All Solace Cloud production brokers should be on 10.0.1 or 10.2.1; 10.4.1 Cloud upgrades are currently scheduled for August. See: [https://solace.com/support/support-dates-for-release-versions/](https://solace.com/support/support-dates-for-release-versions/)  
Glad it’s working! Sorry we didn’t ping this thread to let you know.

---

<div class="post-metadata">

**Author:** ![sjaak](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/sjaak/32/644_2.png) [@sjaak](https://community.solace.com/u/sjaak)\
**Post date:** [May 16, 2023, 7:22pm UTC](https://community.solace.com/t/how-to-empty-a-queue-with-200-messages/810/16 "2023-05-16T19:22:48Z")

</div>

@Aaron No problem, I’m happy the feature arrived! Thanks
