Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Caching QueueClient causing issues with peek

$
0
0
I am caching my QueueClient object in a static property, since Microsoft recommends not recreating it all the time (http://msdn.microsoft.com/en-us/library/windowsazure/hh851740.aspx).  I have an MVC view where I want to be able to see the things sitting in my queue.  If I use Peek or PeekBatch, it works the first time, but subsequent calls return nothing... until five minutes later, then it works again (rinse, repeat).  If I recreate QueueClient on every hit on my MVC action method, it works every single time.  Can someone please tell me why reusing my QueueClient does this, as well as provide a recommendation?  Thanks!

Viewing all articles
Browse latest Browse all 1916

Trending Articles