Azure Service Bus Premium: Large Message Support Generally Available

Published Nov 02 2021 08:00 AM 1,277 Views
Microsoft

Messaging and eventing systems exist to move transient information like events and commands between parts of a system. Larger information items, like rich documents or very large lists of inventories, are commonly handled in file systems, also because they typically have more permanence and are being reused.

 

A file system or web-based file store has protocol facilities that deal with the special challenges of transferring large files, including being able to recover from dropped connections. Generally, the most efficient way for moving large files between applications or services is through a shared file system or shared web store that the publisher and the consumers of the file all can access, and to announce the upload to those consumers via an event delivered through a messaging/eventing system. This technique is commonly referred to as the "claim-check pattern".

 

While this is and remains our best-practice guidance for all Azure Messaging services, there are circumstances when moving large documents directly through a messaging system is a good alternative option, including:

 

  • Publisher and consumer do not have shared access to a common file store because, for instance, one or both reside in isolated network environments.
  • Batches of smaller messages or documents containing lists of data items are commonly small (under 1 MByte), but may spike up in size under special circumstances.
  • Transfers need to be initiated or settled in the scope of a transaction also spanning settlement of initiating job or message output carrying the result of processing the file.
  • The decision has been made long ago and the application has already been built and is using large messages.

 

The last case was the leading motivation for introducing the "Large Message" feature in Azure Service Bus Premium. The feature is a new, per-entity message size limit configuration setting that can range from 1MByte to 100 MByte and defaults to 1 MByte.

The configured limit ensures that your application is protected from messages that are larger than expected in existing buffers and by memory configurations and can be set to the exact limits you need, with Service Bus enforcing the limit for that entity.

 

clemensv_msft_0-1635512936189.png

 

 

The introduction of full JMS 2.0 compliance for Service Bus Premium in the beginning of 2021 is convincing more and more customers to drop their existing, expensive JMS message broker products, in some cases even on-premises clusters, and replace them with Azure Service Bus, for existing workloads. Those workloads have often been built with the assumption of message size limits exceeding the prior Azure Service Bus limit of 1 MByte per message, which was a blocker for adoption. With the new maximum message size of 100MByte, the vast majority of customers are now unblocked for their migrations.

 

The new message size limit can be used with all Service Bus entities and features and does not require new APIs or special attention except the configuration setting.

 

Throughput performance matters a lot for large messages, of course. A greater Messaging Units (MU) allocation for the Service Bus namespace allows for larger buffer sizes. At 8+ MU, a single queue can move large messages at over 50 MByte/sec. When using pub/sub distribution with Service Bus topics, large messages do not have the same adverse performance impact as with brokers that maintain distinct queues per subscription, because the underlying log for message contents is shared amongst all subscriptions, meaning the transfer into the log only occurs once. At 8+ MU, a topic with 5 concurrently used subscriptions can move messages at over 22MB/sec, a total of 110MB/sec of output throughput. All this, of course, with the safety net of triple-replicated, flushed-to-disk persistence, spanning Azure availability zones.

 

If you use Event Grid and/or Event Hubs and believe you have a need for transfers of this magnitude, you should consider realizing the respective communication path using a Service Bus queue or topic with your other communication paths unchanged. Many of our customer discussions show that such transfers are made with the expectation of the documents being handled exactly once at one or many consumers, and Service Bus has the right settlement features for keeping track of when such a job has been completed and will also move a faulty document into a dead-letter queue for inspection when it repeatedly causes issues.

 

The Large Messages feature is now generally available (GA) and is a feature of Service Bus Premium. There is no extra cost associated with using the feature.

%3CLINGO-SUB%20id%3D%22lingo-sub-2900186%22%20slang%3D%22en-US%22%3EAzure%20Service%20Bus%20Premium%3A%20Large%20Message%20Support%20Generally%20Available%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2900186%22%20slang%3D%22en-US%22%3E%3CP%3EMessaging%20and%20eventing%20systems%20exist%20to%20move%20transient%20information%20like%20events%20and%20commands%20between%20parts%20of%20a%20system.%20Larger%20information%20items%2C%20like%20rich%20documents%20or%20very%20large%20lists%20of%20inventories%2C%20are%20commonly%20handled%20in%20file%20systems%2C%20also%20because%20they%20typically%20have%20more%20permanence%20and%20are%20being%20reused.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20file%20system%20or%20web-based%20file%20store%20has%20protocol%20facilities%20that%20deal%20with%20the%20special%20challenges%20of%20transferring%20large%20files%2C%20including%20being%20able%20to%20recover%20from%20dropped%20connections.%20Generally%2C%20the%20most%20efficient%20way%20for%20moving%20large%20files%20between%20applications%20or%20services%20is%20through%20a%20shared%20file%20system%20or%20shared%20web%20store%20that%20the%20publisher%20and%20the%20consumers%20of%20the%20file%20all%20can%20access%2C%20and%20to%20announce%20the%20upload%20to%20those%20consumers%20via%20an%20event%20delivered%20through%20a%20messaging%2Feventing%20system.%20This%20technique%20is%20commonly%20referred%20to%20as%20the%20%22claim-check%20pattern%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhile%20this%20is%20and%20remains%20our%20best-practice%20guidance%20for%20all%20Azure%20Messaging%20services%2C%20there%20are%20circumstances%20when%20moving%20large%20documents%20directly%20through%20a%20messaging%20system%20is%20a%20good%20alternative%20option%2C%20including%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EPublisher%20and%20consumer%20do%20not%20have%20shared%20access%20to%20a%20common%20file%20store%20because%2C%20for%20instance%2C%20one%20or%20both%20reside%20in%20isolated%20network%20environments.%3C%2FLI%3E%0A%3CLI%3EBatches%20of%20smaller%20messages%20or%20documents%20containing%20lists%20of%20data%20items%20are%20commonly%20small%20(under%201%20MByte)%2C%20but%20may%20spike%20up%20in%20size%20under%20special%20circumstances.%3C%2FLI%3E%0A%3CLI%3ETransfers%20need%20to%20be%20initiated%20or%20settled%20in%20the%20scope%20of%20a%20transaction%20also%20spanning%20settlement%20of%20initiating%20job%20or%20message%20output%20carrying%20the%20result%20of%20processing%20the%20file.%3C%2FLI%3E%0A%3CLI%3EThe%20decision%20has%20been%20made%20long%20ago%20and%20the%20application%20has%20already%20been%20built%20and%20is%20using%20large%20messages.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20last%20case%20was%20the%20leading%20motivation%20for%20introducing%20the%20%22Large%20Message%22%20feature%20in%20Azure%20Service%20Bus%20Premium.%20The%20feature%20is%20a%20new%2C%20per-entity%20message%20size%20limit%20configuration%20setting%20that%20can%20range%20from%201MByte%20to%20100%20MByte%20and%20defaults%20to%201%20MByte.%3C%2FP%3E%0A%3CP%3EThe%20configured%20limit%20ensures%20that%20your%20application%20is%20protected%20from%20messages%20that%20are%20larger%20than%20expected%20in%20existing%20buffers%20and%20by%20memory%20configurations%20and%20can%20be%20set%20to%20the%20exact%20limits%20you%20need%2C%20with%20Service%20Bus%20enforcing%20the%20limit%20for%20that%20entity.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22clemensv_msft_0-1635512936189.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F321335i6436C2B765AAE943%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22clemensv_msft_0-1635512936189.png%22%20alt%3D%22clemensv_msft_0-1635512936189.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20introduction%20of%20full%20JMS%202.0%20compliance%20for%20Service%20Bus%20Premium%20in%20the%20beginning%20of%202021%20is%20convincing%20more%20and%20more%20customers%20to%20drop%20their%20existing%2C%20expensive%20JMS%20message%20broker%20products%2C%20in%20some%20cases%20even%20on-premises%20clusters%2C%20and%20replace%20them%20with%20Azure%20Service%20Bus%2C%20for%20existing%20workloads.%20Those%20workloads%20have%20often%20been%20built%20with%20the%20assumption%20of%20message%20size%20limits%20exceeding%20the%20prior%20Azure%20Service%20Bus%20limit%20of%201%20MByte%20per%20message%2C%20which%20was%20a%20blocker%20for%20adoption.%20With%20the%20new%20maximum%20message%20size%20of%20100MByte%2C%20the%20vast%20majority%20of%20customers%20are%20now%20unblocked%20for%20their%20migrations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20new%20message%20size%20limit%20can%20be%20used%20with%20all%20Service%20Bus%20entities%20and%20features%20and%20does%20not%20require%20new%20APIs%20or%20special%20attention%20except%20the%20configuration%20setting.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThroughput%20performance%20matters%20a%20lot%20for%20large%20messages%2C%20of%20course.%20A%20greater%20Messaging%20Units%20(MU)%20allocation%20for%20the%20Service%20Bus%20namespace%20allows%20for%20larger%20buffer%20sizes.%20At%208%2B%20MU%2C%20a%20single%20queue%20can%20move%20large%20messages%20at%20over%2050%20MByte%2Fsec.%20When%20using%20pub%2Fsub%20distribution%20with%20Service%20Bus%20topics%2C%20large%20messages%20do%20not%20have%20the%20same%20adverse%20performance%20impact%20as%20with%20brokers%20that%20maintain%20distinct%20queues%20per%20subscription%2C%20because%20the%20underlying%20log%20for%20message%20contents%20is%20shared%20amongst%20all%20subscriptions%2C%20meaning%20the%20transfer%20into%20the%20log%20only%20occurs%20once.%20At%208%2B%20MU%2C%20a%20topic%20with%205%20concurrently%20used%20subscriptions%20can%20move%20messages%20at%20over%2022MB%2Fsec%2C%20a%20total%20of%20110MB%2Fsec%20of%20output%20throughput.%20All%20this%2C%20of%20course%2C%20with%20the%20safety%20net%20of%20triple-replicated%2C%20flushed-to-disk%20persistence%2C%20spanning%20Azure%20availability%20zones.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20use%20Event%20Grid%20and%2For%20Event%20Hubs%20and%20believe%20you%20have%20a%20need%20for%20transfers%20of%20this%20magnitude%2C%20you%20should%20consider%20realizing%20the%20respective%20communication%20path%20using%20a%20Service%20Bus%20queue%20or%20topic%20with%20your%20other%20communication%20paths%20unchanged.%20Many%20of%20our%20customer%20discussions%20show%20that%20such%20transfers%20are%20made%20with%20the%20expectation%20of%20the%20documents%20being%20handled%20exactly%20once%20at%20one%20or%20many%20consumers%2C%20and%20Service%20Bus%20has%20the%20right%20settlement%20features%20for%20keeping%20track%20of%20when%20such%20a%20job%20has%20been%20completed%20and%20will%20also%20move%20a%20faulty%20document%20into%20a%20dead-letter%20queue%20for%20inspection%20when%20it%20repeatedly%20causes%20issues.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Large%20Messages%20feature%20is%20now%20generally%20available%20(GA)%20and%20is%20a%20feature%20of%20Service%20Bus%20Premium.%20There%20is%20no%20extra%20cost%20associated%20with%20using%20the%20feature.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2900186%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20%22Large%20Message%22%20feature%20of%20Azure%20Service%20Bus%20Premium%20is%20now%20generally%20available%20for%20production%20use.%20The%20feature%20is%20a%20new%2C%20per-entity%20message%20size%20limit%20configuration%20setting%20that%20can%20range%20from%201MByte%20to%20100%20MByte%20and%20defaults%20to%201%20MByte.%20The%20generous%20100%20MByte%20limit%20enables%20a%20broad%20range%20of%20queue-based%20document%20transfer%20use-cases.%20The%20configurability%20of%20the%20limit%20ensures%20that%20your%20application%20is%20protected%20from%20messages%20that%20are%20larger%20than%20expected%20in%20existing%20buffers%20and%20by%20memory%20configurations%20and%20can%20be%20set%20to%20the%20exact%20limits%20you%20need.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2900186%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Service%20Bus%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Nov 02 2021 01:20 AM
Updated by: