16th December 2021

Testing Service Bus Handlers using Azure.Messaging.ServiceBus client library

Testing service bus
Share article

In April 2020, Microsoft released a new client library for Azure Service Bus called Azure.Messaging.ServiceBus. This new library is based on the open Advanced Message Queuing Protocol (AMQP) standard. You can construct applications using components that are built using different languages and frameworks, and that run on different operating systems. All these components can connect to Service Bus and seamlessly exchange structured business messages efficiently and at full fidelity. There are no official samples yet and very few (if any) blogs covering how to test. But after a bit of trial and error, we managed to get some tests working that we’re happy with, hence sharing here so that others could benefit. Here we cover testing the very basic handling of messages, although it should also be a useful starting point for testing more advanced features.

Further reading

We use cookies to make your experience on our website better. By clicking on “Accept Cookies”, you are agreeing for cookies to be used. More information.