Using Azure Service Bus, how do you get dead lettering to work with a session based queue in a Request/Response scenario?
  1. I am using Azure Service Bus
  2. I have a request queue that is not session based
  3. I have a session based response queue
  4. I use session = ResponseQueue.AcceptMessageSession(correlationId) to receive message
  5. I use await session.ReceiveAsync(timespan)

If the Receive times out I fail the client's request but the response message might end up in the Response Queue after the fail.

I have set EnableDeadLetteringOnMessageExpiration = true on the Response Queue.

The problem is that if the Receive times out and the Response is put in the queue it never moves to the DeadLetter Queue when the TTL expires.

How do I get this scenario to work ?

I want the responses to Expire on the session based Response Queue.

fromGlasgow

            


January 20th, 2014 9:24pm

hi fromGlasgow,

Did you try to change "await session.ReceiveAsync(timespan)" to use session.BeginReceive method?

// start asynchronous receive operation 
                                 session.BeginReceive(TimeSpan.FromSeconds(ResponseMessageTimeout), ProcessResponse, session); 

I suggest you could try it. And at the same time, I think you could refer to this code sample (http://code.msdn.microsoft.com/windowsazure/Brokered-Messaging-Request-6759a36e ) and try it.

Please try it.

Regards,

Will

Free Windows Admin Tool Kit Click here and download it now
January 21st, 2014 4:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics