Pergunta

I'm trying to integrate with the Azure Service Bus to perform brokered messaging. I've used the managed .NET API successfully before, but this time I need to use the HTTP API.

When processing a message, if I determine that a message is poisonous (i.e. it can never be processed successfully), I want to move the message to the dead-letter queue.

In the managed API, I'd call BrokeredMessage.DeadLetterAsync() which lets me specify the reasons for dead-lettering the message and moves it to the dead-letter queue as an atomic operation.

Having been reading through the HTTP API documentation, I've found and invoked operations to perform the other actions, such as peek-lock, delete a locked message or abandon a lock, but I can't find an explicit operation to dead-letter a message.

Does this operation exist in the HTTP API?

Foi útil?

Solução

DeadLetter operation today is not supported thru the http/rest API. We will add that support in an upcoming release. When the max delivery count for any message is reached and it is still not completed then it will be automatically deadlettered if that is enabled for the queue/subscription. The connectivity mode mentioned above is for the .NET API where the SBMP service bus protocol is tunneled over a http/port80 connection so it is not using REST APIs for that.

Outras dicas

Even though I did not find any documentation for it, you can access dead letter messages via:

https://{servicebusnamespace}/{topic}/subscriptions/{subscriptionname}/$deadletterqueue/messages/head

I took a look at the REST Api Reference too and I could not find a way. There's a comparative table that shows features that are available through REST Api and features available through .NET SDK.

http://msdn.microsoft.com/en-us/library/windowsazure/hh780771.aspx

It sounds strange for me because I thought that .NET SDK calls a REST API Resource.

I believe that you must apply Peek-Lock on a message and after the processing, delete it.

Peek-lock message:

http://msdn.microsoft.com/en-us/library/windowsazure/hh780735.aspx

Delete:

http://msdn.microsoft.com/en-us/library/windowsazure/hh780768.aspx

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top