Home:ALL Converter>comparing with current date in Service bus topic subscription rule/filter

comparing with current date in Service bus topic subscription rule/filter

Ask Time:2018-10-17T21:40:29         Author:Ekaterina

Json Formatter

In my current project I have an idea of using filters/rules on topic's subscription for a custom retry policy.

I get a message from a topic in an Azure Function and try to send it to a remote service. If the service throws a Timeout exception, I want to add a custom property named PostponeUntil with a specific date-time (for example, in an hour) to the message, add it to the topic again and then use a rule on a subscription to filter out this message until it is the time for a retry. Is it possible to do with SqlFilter something like this:

 var filter = new Microsoft.Azure.ServiceBus.SqlFilter("GETDATE() = PostponedUntilDateTime");

If not, what are the alternatives for a scenario that I have?

Author:Ekaterina,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/52856332/comparing-with-current-date-in-service-bus-topic-subscription-rule-filter
yy