Getting Started

Azure messaging

Azure offers several messaging services, each built for specific purposes. The Particular Service Platform supports Azure Service Bus and Azure Storage Queues.

Azure Service Bus

Azure Service Bus is a fully-fledged enterprise messaging service with support for queuing, publish/subscribe, and more advanced integration patterns. It is designed to integrate applications or application components that may span multiple communication protocols, data contracts, trust domains, or network environments.

Azure Service Bus has two pricing tiers: Standard and Premium. The Premium tier provides hardware-level isolation, which means each customer's workload runs on dedicated hardware. Premium tier uses messaging units for scaling and pricing and guarantees predictable throughput and performance. The Standard tier offers pay-as-you-go pricing with quota-based throughput and non-guaranteed latency. Microsoft recommends running production systems on the Premium tier.

➕ Pros:

  • Supports transactional message operations across multiple queues and topics (cross-entity transactions)
  • Up to 100 MB message size on the Premium tier
  • Scripted infrastructure deployment using the NServiceBus ASB CLI
  • Supports the AMQP 1.0 protocol over TCP and WebSockets

➖ Cons:

  • Some features are only available on the Premium tier
  • The maximum message size is 256 KB on the Standard tier
  • Cross-entity transactions are limited to 100 messages
  • No cross-namespace communication
  • No emulator for local development or testing available

Try the Azure Service Bus Tutorial →

When to use Azure Service Bus

Azure Service Bus should be considered the default messaging choice for Azure. Alternatives should be considered only when the message size limitations are not sufficient or if a more portable queueing technology is required.

Azure Queue Storage

Azure Queue Storage offers a simple, low-cost, and minimal messaging service based on the Azure Storage infrastructure.

➕ Pros:

  • Queues can contain up to 200 TB of messages
  • Cheaper than Azure Service Bus
  • Azure Storage Emulator for local development and testing

➖ Cons:

  • The maximum message size is 64 KB
  • Higher latency due to HTTP communication
  • No cross-entity transactions
  • The maximum number of requests (e.g. message delivery) per storage account is 20,000 per second (2,000 per second for single queues)

Try the Azure Storage Queues sample →

When to use Azure Storage Queues

Azure Service Bus is recommended as the default messaging choice for Azure. Consider Azure Storage Queues when a managed message queuing technology is required for simple messaging needs or when Azure Service Bus doesn't meet critical requirements.

SQL transport

SQL transport is an NServiceBus feature that can use existing SQL Server databases as feature-complete message queues.

➕ Pros:

  • Runs on infrastructure which often already exists
  • Strong transaction integration with business data operations
  • Runs on cloud-hosted and on-premises SQL Server-compatible data stores (including SQL Server Express for development, testing, and CI)
  • Arbitrary message sizes
  • Allows for exactly-once processing if business data and message data are in the same database
  • Ease of backup and recovery as business data and messages are backed up in the same database

➖ Cons:

  • Not an actual message queue
  • More expensive and laborious to scale
  • Impacts overall database performance
  • Lower message throughput compared to specialized message queuing technologies

Try the SQL transport sample →

When to use SQL transport

Consider using SQL transport if an existing application already uses a SQL Server-compatible data store and only a limited amount of messaging is being introduced. SQL transport can be a good stepping-stone when introducing messaging into an existing system without the introduction of new infrastructure.

Other services

Azure offers other messaging services focused on asynchronous communication. These services are not directly supported by the Particular Service Platform, however they might be combined in combination with supported message queueing systems to handle data distribution needs by more specialized technologies.

  • Azure Event Grid is an integration focused messaging system using the publish-subscribe model. Azure Event Grid can ingest and distribute events provided by applications, other Azure Services or IoT devices using HTTP protocols (MQTT support in public preview). By default, Event Grid uses a push-model to forward events to all subscribers.
  • Azure Event Hubs is a data streaming platform specialized in large-scale event ingestion and data distribution. While data streaming platforms like Azure Event Hubs or Apache Kafka use shared or similar terminologies, they differ significantly from traditional message queuing systems and are designed to solve a different set of problems. Read more about the differences between event streaming and message queues.

Additional resources

Do you have questions?

Ask our solution architects

Get help with your proof of concept

Book a call