0
votes

Good afternoon guys, I'm going through an interesting situation.

I have a topic and this topic has two queues, and in my source code, I'm going to send a message to the topic. But the problem is that in one of the queues, the message should be read only after 24 hours.

Is there any configuration to do in the queue or some property to put in the BrokeredMessage that I am sending?

1

1 Answers

2
votes

You could publish/send your messages scheduled for future delivery specifying ScheduledEnqueueTimeUtc value.

Update: you could leverage a Filter Rule Action on subscription to set the ScheduledEnqueueTimeUtc value.

Update 2: The idea with filter rule action won't work. Evaluation is done on the topic (which is a queue on its own) and not on subscription. Not to mention the documentation that has almost no details on how to do it.

Alternative approach could be to set a default TTL on your subscription and enable "Deal Lettering On Message Expiration". That will move any messages with the expired TTL of 24 hours (or any other arbitary time you need) to the subscription's dead-letter queue. With that in place, you can set up "Forward Dead Lettered Messages To" to a queue your endpoint needs to process.