0

I'm trying to create a QueueClient for my Azure ServiceBus Queue.

var client = MessagingFactory.CreateQueueClient("testqueue");

I'm hitting this code using a breakpoint, but then after this, nothing happens. No exception but also no next step in code...

I'm using this inside another application so I think it might has to do something with assembly versions of somesort, but shouldn't this throw an exception? I'm very confused...

edit:

Nor the "No client" or the "Yes client" is written to the console. Also, no exception?!:

var client = MessagingFactory.CreateQueueClient("testqueue"); if(client == null) { Console.WriteLine("No client"); } else { Console.WriteLine("Yes client"); }

Ropstah
  • 17,538
  • 24
  • 120
  • 194

1 Answers1

1

I'm guessing here, that receiveAndDelete means "Won't continue until a message has been received", so basically your program is waiting to receive a message from the queue.

Are you sure there is any messages in your testqueue?

You can't always trust the azure portal in this regard, so try adding a few more messages.

To Confirm, try waiting 1 minute (the default timeout). You should then get a TimeoutException, as explained here: http://msdn.microsoft.com/en-us/library/hh182019.aspx

Soraz
  • 6,610
  • 4
  • 31
  • 48