Installers and Subscriptions

We have installers turned off in production in accordance with Particular’s guidance and so we create queues manually. Do we also have to create subscriptions manually (our transport is Azure Service Bus)?

The topic, bundle-1, is already in our production namespace, although I’m not 100% sure how it got there. I may have deployed a test version of an application with installers turned on to our production environment and that may have done it.

I recently deployed a monitoring application to production (with installers turned off) similar to this sample: Monitor with ServiceControl events • ServiceControl Contracts Samples • Particular Docs

The application failed at startup with this error message:

AutoSubscribe was unable to subscribe to event 'ServiceControl.Contracts.HeartbeatStopped': Entity 'servicebus-ipcprod-prod:Topic:bundle-1|Ipc.Capacitor.ServicePulse' was not found.

I created the subscription manually in production copying what was in our test environment and that seemed to fix the problem.

So, do we need to create subscriptions manually in production?

-Mark

Yep, you do. But this can be scripted as part of a DevOps process.

Check out Azure Service Bus operational scripting with our command-line tool, specifically the endpoint subscribe command.

What’s the recommended way to do this? With queues, I just include it as part of my endpoint DevOps process and there’s one queue for the endpoint. With Azure subscriptions, it seems that you have to create a filter on the subscription per event that you are subscribed to and this can change over time as you add new code that subscribes to new events.

-Mark

When you’re taking control of your DevOps process, you do need to keep track of what endpoints are subscribing to what events, and have a (for example) subscriptions.ps1 with each endpoint, where you include the command-line tool endpoint subscribe instructions for each subscription. Then you execute that script as part of the endpoint deployment process.