Вопрос

I'd like to change a message property before abandoning. The following code don't work. I'm receiving the message with the initial Label.

message.Label = "failed";
message.Abandon();

It it possible to define that message was abandoned?

Это было полезно?

Решение

You cannot update content of an Azure Service Bus Queue message object. Frankly, if I have to update a message content, than there is something wrong in my approach.

You can, however, update the content of an Azure Storage Queue message, using the UpdateMessage method or any of its async friends. In any case, I feel wrong the general approach of touching message content!

For your purpose I suggest that you take a look at DeadLetterQueue feature of Azure SErvice Bus Queues and Topics, or the DequeueCount property of Azure Storage message to determine whether there is something wrong with the message.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top