If you caught our webinar on NServiceBus, you’ll see many resources in the .NET Aspire Resources dashboard. I want to take a moment to address those containers and why there are so many resources.
Seq
When it comes to logging, we are fans of structured logs and telemetry. Seq makes it easy for us to capture the details in a central server and then display and search them through their UI. It is a self-hosted search and analysis server that integrates with many loggers - including Serilog, NLog, log4net, Microsoft.Extensions.Logging, and OpenTelemetry .NET SDK.
While we use it in our C# apps, Seq is not limited to .NET. They have support for Node.js, Python, Java, Ruby, Go, and others. So if you want a self-hosted server to improve your analysis of traces and logs, check out Seq!
For eShopOnNServiceBus, this is the seq
container. We recently had issues with the latest
image not coming up Healthy in this particular repo, so we have switched to use the 2025.1
image.
Particular Software Platform Containers
The main focus of that webinar is NServiceBus and the Particular Software platform. We are a Particular Software partner and have recognized professionals in that arena. We work with the platform for our clients where it makes sense.
For the Particular sources, the containers include ServiceControl and ServicePulse.
ServiceControl is the background service that takes in the data from NServiceBus and feeds it into ServiceInsight and ServicePulse. The containers for ServiceControl include:
ServiceControl
ServiceControl-Audit
ServiceControl-Monitoring
ServiceControl-RavenDB
- The database used by ServiceControl
ServicePulse provides monitoring and recoverability for systems. We showed many of the features of ServicePulse during our webinar because we were able to contain the service. This is the only container for ServicePulse:
ServicePulse
When we configured Service pulse, it depends on the ServiceControl container, as well as the audit and monitoring contains.
RabbitMQ Resources
For our demos towards the end, we used the RabbitMQ Transport with NServiceBus. For .NET Aspire, the RabbitMQ resources include:
rabbitUser
- builder parameterrabbitPassword
- builder parametertransport
- the RabbitMQ server which uses the RabbitUser and RabbitPassword parameters
Python in .NET Aspire?
Yes! We have a Python consumer that is listening to the RabbitMQ queues, which are populated by a .NET app.
The python-queue-listener
is our Python script that isn’t in the eShopOnNServiceBus solution but is in the python
folder. Typically, you’ll see these products in distributed environments with different languages, so that’s why I wrote this demo specifically to show that.
The thing to watch out for is that our print()
statements in the Python script aren’t echoing out to the Aspire console. However, we do see a message gets sent to the payments
queue, so we know that the script is running.
Special thanks to Maddy Montaquila for showing me how to add the Python App to our Aspire setup!
NServiceBus Endpoints
We demo the NServiceBus platform with our development licenses. Not only are they free for development, but their instructions for setting up the license are clear and make it easy to get started right away!
The NServiceBus-baskets
and NServiceBus-orders
containers are .NET worker apps that have our NServiceEndpoints for baskets and orders.
Application Containers
The publicapi
and web
containers are our eShopOnNServiceBus API and website projects. We have them configured to wait for the Seq service, the RabbitMQ transport, and ServicePulse.
Conclusion
When it comes to showing demos with distributed applications, .NET Aspire makes it easy. All of the servers can be contained, and we can specify that containers depend on others and to wait for them to come up. We can contain more than just .NET apps - as seen in this example with Python. In our August webinar, we’ll be talking more about .NET Aspire - from getting started to adding it to your legacy apps! So if you want to learn more about the details behind this, tune in!