Migrating a standard Azure service bus to premium messaging

In order to set up redundancies to prevent an outage in the case Azure has a regional hard down (such as the one that occurred in South Central a few weeks ago; it does happen so be prepared), we had to upgrade our Azure Service Bus from Standard Messaging to Premium.  Unfortunately, this can’t be done via the Azure Portal UI so we had to turn to Powershell.  This is how to do it.

Note: This does not replace your existing service bus that you are migrating.  This creates a copy of all settings of your current service bus and moves them to a premium service bus.  The two exist side-by-side until you blow away the old service bus.

Install modules for Powershell

First, make sure the Azure module is installed.

Second, add the service bus module:

install-module azurerm.servicebus -force

Connect to your Azure account

Run Connect-AzureRmAccount to connect to your Azure account. You’ll see something like this come back:

Account: azureuser@contoso.com
Environment: AzureCloud
Subscription: xxxx-xxxx-xxxx-xxxx
Tenant: xxxx-xxxx-xxxx-xxxx

You can only target one subscription at a time.  If “Subscription” above is not correct in that the service bus is in another subscription, use the Set-AzureRmContext command.

Performing the migration

The order of the commands you’ll need to perform are as following:

  1. New-AzureRmServiceBusNamespace – Create a new namespace of scale “Premium” to put the service bus in
  2. Start-AzureRmServiceBusMigration – Begin the migration process
  3. Get-AzureRmServiceBusMigration – Monitor the progress of the migration
  4. Complete-AzureRmServiceBusMigration – Finalize and commit the migration

The documentation linked on the above commands is very good and gives you examples of what needs to be done for each.  Good luck!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: