What's the proper way to abandon an Azure SB Message so that it becomes visible again in the future in a way I can control?

前端 未结 5 1781
梦谈多话
梦谈多话 2020-12-17 08:38

So the scenario is that I\'m using an SB queue to throttle outgoing callbacks to other services. One of the standard problems with calling back to other services is that the

5条回答
  •  孤城傲影
    2020-12-17 09:09

    If you want to put a message away for a while and you have a place to write down the SequenceNumber (which might be in Session state in a sessionful queue), you can Defer() it. Deferred messages can be retrieved using a special Receive overload giving the SequenceNumber; that's also the only way to get at them again other than them expiring, so careful. This feature was built for workflows and state machines so that they can deal with out of order message arrival.

提交回复
热议问题