SEMP API to delete the messages from the queue?
Hi Team,
Is there any way or SEMP API available to delete the messages from a queue?
Thanks
Tejas
Best Answer
-
@tejaschowsalkar , Looking at the SEMPv2 Action API reference, there is no single API call to delete ALL messages.
You will have get the list of messages with GET first
https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/action/index.html#/queue/getMsgVpnQueueMsgsand iterate over them to call delete
https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/action/index.html#/queue/doMsgVpnQueueMsgDeleteAlso pl see this thread:
https://solace.community/discussion/657/delete-all-the-messages-on-a-queue-using-legacy-semp2
Answers
-
@tejaschowsalkar , Looking at the SEMPv2 Action API reference, there is no single API call to delete ALL messages.
You will have get the list of messages with GET first
https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/action/index.html#/queue/getMsgVpnQueueMsgsand iterate over them to call delete
https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/action/index.html#/queue/doMsgVpnQueueMsgDeleteAlso pl see this thread:
https://solace.community/discussion/657/delete-all-the-messages-on-a-queue-using-legacy-semp2 -
Thanks @nram,this helps
0 -
@tejaschowsalkar Can you accept the answer from @nram for the benefits of other people in the community? Thanks!
0 -
-
Thanks, @tejaschowsalkar. I've accepted it as the best answer on your behalf.
0 -