Skip Navigation LinksAzure Developers Guide > Azure Service Bus > Brokered Messaging > Service Bus Brokered Messaging > When to Use What

Training Courses

All course material is in English, and courses are delivered in English. Feel free to contact me for further information. cloudcasts.net@gmail.com

When to Use What

With two sets queuing capabilities now present in the Azure platform with different APIs, feature sets, and no doubt pricing models one of the challenges for developers is understanding when to use queues in Azure storage services and when to use Service Bus brokered messaging services.

The following table shows a feature comparison of the two services.

Feature

Azure Storage Queues

Service Bus Messaging

.NET Programming Model

Azure Storage Client

Direct programming model.

REST Interface

Supported

Supported

Development Simulator

Supported

 

WCF Bindings

 

Supported

Message Serialization

Strings

Byte arrays

Serializable objects

Streams.

Maximum Message Size

64 KB

256 KB

Durable Messaging

Supported

Supported

Maximum Message Lifetime

1 week

Unlimited

Message Expiration

Supported

Supported

Publish-Subscribe

 

Supported

Duplicate Detection

 

Supported

Message sessions

 

Supported

Schduled Enqueue Time

Supported

Supported

Message deferral

 

Supported

Dead-Lettering

 

Supported.

Dequeuing Modes

Get-delete mode.

Peak-Lock

Receive and Delete

Receive Latency

Receiver acts as a polling consumer. Receive latency is proportional to polling interval.

Receiver acts as a “sticky polling” consumer, receive latency is very low and not related to polling interval.

Pricing Model

Based on data center boundary bandwidth, storage used and transactions.

Based in entity hours and message throughput.

 

Azure Storage Service Queues

Azure storage queues provide a basic asynchronous queue based service that is included in an Azure storage service account. The programming model is simple and similar to the Azure storage table and blob programming model. The billing model for storage service queues is consistent with the other services in Azure storage. Azure storage service queues have an 64 KB limit in message size and 7 days maximum message lifetime, and do not provide the features required for enterprise class messaging systems.

Consider using Azure storage service queues when you require basic queuing functionality with smaller message sizes and lifetimes. As the pricing and programming model is combined with that of other Azure storage services, they should also be considered using them when other Azure storage services are used.

As the pricing for Service Bus brokered messaging has not been announced it is not possible to compare the costs of using the different queuing systems on this at this point in time.

Service Bus Brokered Messaging

Service Bus brokered messaging services provide an enterprise class messaging technology that supports more advanced features, such as publish-subscribe, deadlettering, message sessions and duplicate message detection. Although the billing model has not been announced it is likely to be more complex than that of Azure storage services and there is no way yet of understanding the pricing differences. Maximum message size is limited to 256 KB and message lifetime is practically unlimited.

Consider using Service Bus brokered messagng messaging services when developing systems that require the more advanced enterprise messaging features or would be limited by the maximum message size and lifetime imposed by Azure storage queues.

Relay Service Message Buffers

The Service Bus relay service provides the option to use message buffers to provide temporal decoupling between clients and services using a one-way messaging protocol. Message buffers are stored in memory and therefore are limited in teams of resilience from failures and message expiration.

The messaging functionality provided in the Service Bus brokered messaging services greatly supersedes that of the relay service message buffers and it is therefore recommended to use Service Bus queues, topics and subscriptions instead of relay service message buffers.

It is expected that message buffering will remain a feature in the relay service for the considerable future for compatibility reasons, and there may be scenarios where it is chosen instead of Service Bus brokered messaging services.

Speaking Engagements