How to empty a queue with 200+ messages?

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!

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.

Hope this helps
Richard

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”.

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

@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! :smile:

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

<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?

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

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

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. :slight_smile:

I’m missing the cli for that task :slight_smile:

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 :frowning:

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

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:


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!

@Aaron I will check this with support

A screenshot of a Solace Cloud 10.0.x service

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/
Glad it’s working! Sorry we didn’t ping this thread to let you know.

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