NServiceBus: first setup
The recipe:
- create an empty class library project named SampleBusServer;
- delete the “Class1” file;
- add a reference, using nuget, to NServiceBus.Host;
Once done you should see something really similar to:
And if you tale a look at the project properties something like:
NServiceBus has its own built-in host, so our project is hosted by NServiceBus itself.
Now, as the project name implies, the role of this endpoint, start calling it with its role name, is to host a “server” endpoint whose role is to receive “messages”. In order to achieve this add a new class to the project named EndpointConfig like the following:
Press F5 and you should see this:
Amazing, we have a running NServiceBus host waiting…for nothing, but waiting :-)
.m