Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule commands - should use alternative method? #14

Open
srpeirce opened this issue Oct 30, 2018 · 2 comments
Open

Schedule commands - should use alternative method? #14

srpeirce opened this issue Oct 30, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@srpeirce
Copy link
Contributor

We are currently scheduling commands by setting Message.ScheduledEnqueueTimeUtc.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.brokeredmessage.scheduledenqueuetimeutc?view=azure-dotnet#Microsoft_ServiceBus_Messaging_BrokeredMessage_ScheduledEnqueueTimeUtc

I think we should be scheduling messages using the QueueClient.ScheduleMessageAsync(…)
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.servicebus.queueclient.schedulemessageasync?view=azure-dotnet

This means that we would be able to cancel the scheduled message:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.servicebus.queueclient.cancelscheduledmessageasync?view=azure-dotnet

Why is this helpful?

  • I suspect there are multiple scenarios where we might wish to cancel something. E.g. a user schedules something and then changes their mind.
  • Able to cancel a command, make some change, and re-schedule
@srpeirce srpeirce changed the title Schedule commands - should use alternatice method? Schedule commands - should use alternative method? Oct 30, 2018
@srpeirce srpeirce added the enhancement New feature or request label Oct 30, 2018
@srpeirce
Copy link
Contributor Author

@ilivewithian What do you think?

@ilivewithian
Copy link
Contributor

Ah, yes I think that's worth doing. I'm not near a laptop at the moment, but I think it's a nice improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants