🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
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 -