If I schedule message using the ScheduledEnqueueTimeUtc broker property, is there a way to view and cancel those messages before they're enqueued using this SDK? They don't seem to show up when I use peek_lock_subscription_message or receive_queue_message which makes sense, but is there a way that I can see them?
Is something like the use case described here: https://azure.microsoft.com/en-gb/blog/azure-storage-queues-new-feature-pop-receipt-on-add-message/ supported for service bus queues? Basically adding a task scheduled in the future, and getting some id/value that can be used to delete it before it's enqueued?
Hi @mcintyre94
We're working to replace this SDK with a complete fresh new one. I don't think that your ask can be done right now, and we won't add any features now :(. But we're willing to discuss contribution if you found out using the HTTP rest api doc that it's possible:
https://docs.microsoft.com/en-us/rest/api/servicebus/
Tagging @annatisch who is working on the new service bus SDK, if this scenario could be covered. Thank you.
Hi @lmazuel - thanks for replying so quickly! :) Do you have any kind of ETA on when you expect that new service bus SDK to land or is this still very early? Would I be best moving to storage queues for now if I need this?
FYI I also asked about this on StackOverflow: https://stackoverflow.com/questions/52333654/azure-service-bus-queue-can-i-manage-cancel-scheduled-messages, and somebody pointed out that the .net client apparently does this: https://weblogs.asp.net/sfeldman/azure-service-bus--canceling-scheduled-messages
But the HTTP endpoint docs say it doesn't return any response body: https://docs.microsoft.com/en-us/rest/api/servicebus/send-message-to-queue
I'll try to find some time to look at what the .net client is doing and see if it might work in Python :)
One thought is that since SequenceNumber and LockToken are broker properties just like ScheduledEnqueueTimeUtc, perhaps setting them when creating the task works and the task can then be deleted using the known values we've set. Any thoughts on whether that sounds remotely sane?
The .NET client is definitely more advanced than the Python one, for legacy/history reason... It's totally possible they have features not available here. It's part of what we are trying to solve with the new SDK. @annatisch could give more details on this.
Thanks @lmazuel - indeed the .NET SDK utilizes the AMQP-based management layer to achieve a number of different features that will hopefully be available in the upcoming AMQP-based Python SDK.
We are hoping to have a preview release of the new SDK out this year.
I will keep an eye on open issues against the HTTP-based SDK to make sure to test/check them against the new SDK :)
Gotcha - thanks both :) For now I'll transition to either the .NET SDK or Storage Queues, whichever seems easier. I'd definitely prefer to be on Service Bus queue with the new Python SDK longer term, is there somewhere I can get notified when that's available so we can transition back?
Thanks @mcintyre94 - yes once we have a preview available I'll go through the open issues tagged as Service Bus and let people know :)
@mcintyre94 did you figure out a workaround using python in manage/cancel scheduled messages?
Also in your example in https://stackoverflow.com/a/52364636/4092217, can I schedule message using storage queue service Python SDK?
Thanks in advance
@wobeng I'm afraid I didn't find a workaround for service bus queues in Python - we transitioned to the Java SDK which uses the AMQP API mentioned above.
For that SO example I don't think so, you'd have to know the number of seconds until the time you want to schedule it. There's also a limit of 7 days on that one. https://docs.microsoft.com/en-gb/rest/api/storageservices/put-message
@wobeng , @mcintyre94
I'm hoping to have an alpha release of the new Python SDK out in the next week or two which will support message scheduling and canceling scheduled messages.
@annatisch I can't wait :)
@mcintyre94 Thank you for the fast response.
@mcintyre94 I don't think there is an initial visibility delay in storage queue service Python SDK. visibility_timeout is not to delay message from being active
@annatisch any update on this?
@annatisch any update on this?
Hi @mcintyre94 and @wobeng,
Apologies for the delay - this is just a heads-up to let you know that we have just published a new AMQP-based preview SDK for Service Bus! The API has been newly designed, and you can find documentation here:
While the new API doesn't allow for viewing scheduled messages, you can cancel them.
You can find specific documentation on doing this here.
It would be awesome to get your feedback on the new SDK! I'm going to close this issue now, though please feel free to add additional comments if it's still an issue and I can reopen if needed.
Otherwise if you have any other feedback/feature requests/bug reports for the new SDK, please open new issues.
Thanks!
Most helpful comment
@wobeng , @mcintyre94
I'm hoping to have an alpha release of the new Python SDK out in the next week or two which will support message scheduling and canceling scheduled messages.