The particular service platform – Deploying to endpoints and subscribing for events

In my last post I showed how to create a service and a publisher. In this blogpost I will show how to subscribe to messages and how to deploy components to endpoints. In my blogposts about CompositeUI for Service Oriented Systems I called about services or “things”. I don’t cover that theory here. I encourage you to read those blogposts.

Before we can deploy the undeployed component WarehouseRaid we need to create a hosting component for that. This can be done by clicking on “New Endpoint”. In this step we are creating Earth and Heaven as NServiceBus Hosts. There are other endpoint types like MVC site available. For the R.I.P.D sample we are building here, a NServiceBus host is sufficient enough.


After having created the two endpoints, we are ready to deploy the WarehouseRaid.



By clicking on Deploy Component…



… we can select one of the previously created endpoints. We select Earth as an endpoint. Yeah, that’s where Nick Walker died, that’s why it makes total sense to deploy it to Earth 😉




After having performed this operation, ServiceMatrix gives us a nice overview what just happened.



But publishing an event without any subscriber doesn’t make a lot of sense. In fact we need a subscriber in Heaven which listens to the PoliceOfficerDied events. Nothing easier than that! We select the event and click on Add Subscriber.



This creates a new component called PoliceOfficerDiedProcessor which is currently not deployed. Before we deploy the PoliceOfficerDiedProcessor we rename it to RegistrationOffice.



In order to deploy the RegistrationOffice we apply the same drill as before. I assume you already know how it works because it is so super easy!


The final picture should look like this



I’d say if you know the drill you can do that in a few minutes, heck even seconds!

The next post is going to cover how to send commands and what ServiceMatrix does for you under the hood. Stay particularly tuned!

About the author

Daniel Marbach

1 comment

Recent Posts