I think what you see is a reception in the background. Behind the scenes, reception calls use a lengthy survey. This means that they access the service bus endpoint and request a message. Service Bus receives this request, and if it has a message, it will immediately return it. If he does not have a message, he will keep the connection open for a period of time if a message arrives. If a message arrives during this time interval, it will be returned to the client. If the message is not available at the end of the time interval, the client sends a response, indicating that there was no message (aka, zero BrokeredMessage). If you call Get without overloading (for example, you did this), it will immediately make another request. This cycle continues until a message is received.
Thus, you see how many times the client requests a message, but it is not there. A lengthy poll makes it more enjoyable than having Windows Azure storage queues because they will immediately return a null result if there is no message. Both technologies typically require exponential shutdown for queries. There are many examples of how to do this. This reduces the time it takes to check the queue and can reduce the number of transactions.
To answer your questions:
Yes, this is the normal expected behavior.
No, this is only one transaction. For the service bus, you receive payment for the transaction each time you put a message in the queue, and every time a message is requested (which can be a bit opaque if Recieve makes calls several times in the background). Please note that the documents indicate that you charge a fee for each inaction transaction (which means zero result when you receive a call).
Again, you can implement a deferred methodology so that you don't end up in the queue so often. Another suggestion that I recently heard is that if you have a queue that does not see much traffic, you can also check the depth of the queue to see if it was> 0 before entering the loop for processing, and if you do not get no messages from you can return to viewing the depth of the queue. I have not tried this, and it is entirely possible that you can get throttling if you check the queue depth too often, I think.
If these are your production numbers, your subscription does not actually process many messages. It would probably be a good idea to abandon the policy until a time is acceptable to wait until it is processed. For example, if itβs normal that the message is sitting for more than 10 minutes, then create a reverse approach that will ultimately check the message every 10 minutes, and then when it receives one process, it immediately closes again.
Oh, there is Receive overload, which takes a timeout, but I'm not 100%, this is a server timeout or a local timeout. If it is local, it can still make calls every X seconds for the service. I think this is based on the OperationTimeout value set in the settings of the Messaging Factory when creating the SubscriptionClient. You have to check it out.
source share