简体   繁体   中英

Azure Service Bus - Delete Scheduled Messages from Topic

I went through a couple of examples that states that the scheduled messages in the azure service bus can be deleted from queue, May I know if the scheduled messages can be deleted from the topic?

This is the scenario that I'm trying to solve.

  1. Sender publishes scheduled messages on the topic
  2. Sender publishes another set of standard messages to the queue.
  3. I would like to read the messages from the queue using a listener/azure function and check if the same messages are scheduled in the topic and delete them from the schedule.
  4. One or more subscriptions will listen to the messages from the topic based on filters when the time delay of the scheduled messages expires.
  5. Azure function/Listener will read the messages from the subscriptions for downstream processing

Also, while reading the scheduled messages from the topic, can I apply any kind of filtering as the volume of scheduled messages in the topic would be very high.

You can cancel scheduled messages from topics via TopicClient.CancelScheduledMessageAsync . Though I am not sure if you can easily achieve what you describe in the rest of your question. Maybe duplicate detection can also help you there, but it would prevent the second set of messages, not the first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM