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

ServiceBus SubscriptionClient.EndReceive() returns null

$
0
0

I call BeginReceive() on a SubscriptionClient like this:

client.BeginReceive(newTimeSpan(6,0,0),newAsyncCallback(DownloadResults),null);

And in the DownloadResults() callback I call client.EndReceive() [client is a static member of the class]

staticpublicvoidDownloadResults(IAsyncResult ar){// Get the message from the service bus.
    msg = client.EndReceive(ar);if(msg ==null){Console.WriteLine("Error!");return;}}

I noticed that sometimes client.EndReceive() returns null. It's not very clear to me by looking at the MSDN page for SubscriptionClient.EndReceive() as to exactly when EndReceive() returnsnull. Is it because the timelimit I specified in  BeginReceive() was exceeded? Or is it because there was an error?


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>