Bartosz
Bartosz

Reputation: 4602

Multiple messages of the same type in Azure Service Bus

I'm trying to get my head around Azure Service Bus functionality. I have an application deployed to different environments (dev, test, staging, etc.). From what I have seen you can have only one message type per bus? Does it mean that to support each environment I would need a separate instance of the service bus? I'm using Masstransit and since it requires standard version of the service to run, I would have to pay significant money for each instance every month. Is there any workaround? Is using RabbitMQ instead my only option?

Upvotes: 0

Views: 1466

Answers (1)

Sean Feldman
Sean Feldman

Reputation: 26057

It looks like you're mixing multiple things here. To be more specific - MassTransit topology and Azure Service Bus service. If you deploy an endpoint for mutiple environments (test and prod for example) to the same Azure Servie Bus namespace, it will obviously collide as MassTransit will use the same entities required for your endpoint for both test and prod.

Instead of that, you should use a namespace per environment. I.e. create 2 namespaces (for example project-test.servicebus.windows.net and project-prod.servicebus.windows.net). This way you can deploy the same MassTransit endpoint that will create identical entities, but they will be segregated by namespace.

To your concern about the cost - on the Standard tier you're paying a monthly fee for the service usage (plus all the message transactions, just to be clear), not number of namespaces you're creating.

Upvotes: 1

Related Questions