Azure Service Bus MQ

Support for registering Azure Service Bus as an MQ Server in ServiceStack is available in ServiceStack.Azure NuGet package:

<PackageReference Include="ServiceStack.Azure" Version="6.*" />

Once installed ServiceBus can be configured the same way as any other MQ Servers, by first registering the ServiceBus IMessageService provider followed by registering all ServiceStack Services you want to be able to invoke via MQ’s:

container.Register<IMessageService>(c => new ServiceBusMqServer(ConnectionString));

var mqServer = container.Resolve<IMessageService>();
mqServer.RegisterHandler<MyRequest>(ExecuteMessage);

AfterInitCallbacks.Add(appHost => mqServer.Start());