Try PubSub+

How to empty a queue with 200+ messages?

sjaaksjaak Member Posts: 74 ✭✭✭
edited June 23 in PubSub+ Event Broker #1

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!

Tagged:

Comments

  • rlawrencerlawrence Member, Employee Posts: 6 Solace Employee

    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

  • AaronAaron Member, Moderator, Employee Posts: 233 Solace Employee

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

  • sjaaksjaak Member Posts: 74 ✭✭✭
    edited June 23 #4

    @rlawrence said:
    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

    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
  • sjaaksjaak Member Posts: 74 ✭✭✭

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

  • sjaaksjaak Member Posts: 74 ✭✭✭
    edited June 23 #6

    @rlawrence said:
    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

    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?

  • rlawrencerlawrence Member, Employee Posts: 6 Solace Employee

    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

  • marcmarc Member, Administrator, Moderator, Employee Posts: 472 admin

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

  • uherbstuherbst Member, Employee Posts: 38 Solace Employee
    edited June 30 #9

    I'm missing the cli for that task :-)

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

Sign In or Register to comment.