简体   繁体   中英

Is SubscriptionClient.RegisterMessageHandler() Using 'Brokered Connections' in Azure Service Bus?

I'm trying to get very specific with estimating pricing using Azure Service Bus. The MS docs are very hard to decipher, but it appears that 'Brokered Connections' are the key variable when it comes to ASB, because in the Standard Tier you get charged for them. As I understand it, Brokered Connections are used with HTTP 'long polling'.

I'm using using this Microsoft.Azure.ServiceBus NuGet package, and listening for messages using the SubscriptionClient and registering a callback to process messages using the RegisterMessageHandler() method.

What I'm trying to figure out is: is this SubscriptionClient using Brokered Connections? If it is, this has a huge impact on my pricing estimate.

Any help is much appreciated!

What I'm trying to figure out is: is this SubscriptionClient using Brokered Connections? If it is, this has a huge impact on my pricing estimate.

A brokered connection is a connection established to the broker. A connection can be used with the ManagementClient over HTTPS or with any other client over TCP port 5671 for AMQP operations (or WebSockets). Each client can either have its own connection or share it. When a client is created using a connection string , a new connection is issued. Alternatively, clients can share/pool a ServiceBusConnection . This will result in multiple clients sharing the same "channel" to talk to the broker. In your code, you'll have to find the balance between sharing connections and creating new ones.

Got an answer from a separate MSDN post. The answer is:

"The SDK uses AMQP for its connections."

So the SubscriptionClient will definitely be incurring brokered connection charges, because AMQP is always a brokered connection.

Now I just need to figure out the cost impact.

Thanks for your response, Sean!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM