Reputation: 67
we have azureSB topic - subscriptions and azureSB queues. I have a requirement that from a subscription, I want to move the data (records present in the subscription) into the queue and delete the records from subscription. I want to do it using the HTTP call. Something like mentioned on link - https://learn.microsoft.com/en-us/rest/api/resources/resources/move-resources#code-try-0
If you have a working template / example for that, please share.
Upvotes: 1
Views: 947
Reputation: 136306
The link you mentioned is for moving top level resources like Service Bus Namespaces, Storage Accounts etc.
What you are looking to accomplish is move messages from a Service Bus Topic Subscription to a Service Bus Queue. You cannot use that link for that.
One possible solution would be to make use of Auto Forwarding
feature in Service Bus and that will automatically move the messages from a Service Topic Subscription to a Queue. You can learn more about it here: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-auto-forwarding. Since it is a setting at the Topic Subscription level, you need not write any code to do so.
Other option would be to do it manually. Here you would read a message from the Service Bus Topic Subscription and then manually send that message to the Queue. For that you can use Service Bus REST API.
Upvotes: 2