Do premium partitioned Azure Service Bus namespaces support large messages (>1MB)?

evt-jonny 5 Reputation points
2024-04-04T00:59:56.82+00:00

We have been looking into switching to a premium, partitioned service bus namespace in order to deal with throughput issues we are seeing with our current non-partitioned namespace.

We receive an error when trying to write a message larger than 1MB to a topic or queue in this new namespace, even when the topic/queue is configured to allow message sizes up to 10MB.

The documentation has no mention of this limitation when switching to a partitioned namespace. Is this a limitation?

Error:

Azure.Messaging.ServiceBus.ServiceBusException
 HResult=0x80131500
 Message=The message (id:64923656, size:4194312 bytes) is larger than is currently allowed (1048576 bytes).
 Source=Azure.Messaging.ServiceBus
 StackTrace:
  at Azure.Messaging.ServiceBus.Amqp.AmqpSender.<SendBatchInternalAsync>d__23.MoveNext()
  at Azure.Messaging.ServiceBus.Amqp.AmqpSender.<SendBatchInternalAsync>d__23.MoveNext()
  at Azure.Messaging.ServiceBus.Amqp.AmqpSender.<>c.<<SendAsync>b__24_0>d.MoveNext()
  at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.<>c__22`1.<<RunOperation>b__22_0>d.MoveNext()
  at System.Threading.Tasks.ValueTask`1.get_Result()
  at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.<RunOperation>d__23`2.MoveNext()
  at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.<RunOperation>d__23`2.MoveNext()
  at System.Threading.Tasks.ValueTask`1.get_Result()
  at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.<RunOperation>d__22`1.MoveNext()
  at Azure.Messaging.ServiceBus.Amqp.AmqpSender.<SendAsync>d__24.MoveNext()
  at Azure.Messaging.ServiceBus.ServiceBusSender.<SendMessagesAsync>d__26.MoveNext()
  at Azure.Messaging.ServiceBus.ServiceBusSender.<SendMessageAsync>d__25.MoveNext()
  at Program.<<Main>$>d__0.MoveNext() in J:\working\asb-sendmessages\asb-sendmessages\Program.cs:line 22
  at Program.<<Main>$>d__0.MoveNext() in J:\working\asb-sendmessages\asb-sendmessages\Program.cs:line 31
Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
549 questions
{count} votes