Test Azure Service Bus Performance by Generating a Million Test Messages in Queue, Topic or Event Hub
Tags: azure, serverless
Published: 2021-02-22 06:22:14

---
canonical_url: https://www.serverless360.com/blog/azure-service-bus-performance-test-on-messages
---

![](https://www.serverless360.com/wp-content/uploads/2017/06/messaging-1.jpg)

For the people into azure service bus namespaces – we often have the need to test our system integration by generating some test messages or events on to the Azure Service Bus entities. You might need this for QA/Development for performance testing, load testing etc. [Service Bus Explorer](https://www.serverless360.com/azure/alternative-to-service-bus-explorer) has been the only key tool so far which has its own limitations being a Desktop app. In one of my recent blog post – Sending Messages / Events to Service Bus Entities using Serverless360- I’ve explained what are those constraints and how [Serverless360](https://www.serverless360.com/) helps overcome them. It explains why Serverless360 can be a good alternative if you’re still using Service Bus Explorer.

**Introduction**

In this blog post, we will see how we can simulate a real-time load test of 1 million events/ messages to [Azure Service Bus Queue, Topic](https://www.serverless360.com/azure-service-bus-monitoring-management) or [Event Hub](https://www.serverless360.com/azure-event-hubs-monitoring-management).

As of now, we have different offerings for Free and Paid customers. Free users can have 10000 events/messages per Activity whereas Paid users can have 1000000 (1 million) events/messages. So, even if you’re just trying out Serverless360, you can still generate 1 million events/messages using multiple activities and be running them multiple times. Paid users can have them in one go.

**Azure Service Bus Performance Test – Generating One Million Messages/Events in Serverless360**

You can either create an Activity Configuration that you can re-use it as many times in future, or you can opt to start an activity right from the entity level. Please refer to the blog post above for how to create Activity Configuration and re-use it.

We can achieve the different pace of message delivery by trying out various combinations of options like Think Time, Batch Size, Message Count, Task Count etc. with the activity configuration. Depending upon the license plan users can configure 1 million events/messages in one go whereas or create multiple activities to achieve the 1 million count using “run-once” multiple times. Let’s see how the Configuration helps with the message delivery speed.

**Configuring 1 Million Messages in One Go**

Set the message count to 1 million in the input box and that’s it. It will start sending messages to the specified entity one by one.

![](https://www.serverless360.com/wp-content/uploads/2017/06/Max-Limit-in-activity-configuration-details.png)

**Speeding up the Delivery Rate With Multiple Threads**

When you increase the TaskCount, it creates additional processes to send the messages together. For example – if TaskCount is 2, then there will be two parallel processes – processing the same activity, speeding up the delivery rate by twice as normal. At the time of writing this post, Serverless360 allows 10 processes per activity. So, it can speed up the delivery by 10 times if you say so.

![](https://www.serverless360.com/wp-content/uploads/2017/06/Speeding-up-the-delivery-rate-with-multiple-threads.png)

**Deliver Messages Faster in Batch**

Another configuration which helps deliver messages faster is “Send Batch”. When you enable Send Batch and set the batch count – it bundles the messages and sends them in one go. At the time of writing this post, Serverless360 allows 10 messages/events at max per batch.

So, it can also help deliver the messages 10 times faster but, there is a catch. When you specify the count for batch-size, make sure the size of the batch does not exceed the allowed quota per message or event size. At the time of writing it is 256KB for a Standard tier and 1 MB for Premium tier. Please refer to the  [Service Bus Quotas](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas) for  more details.

![](https://www.serverless360.com/wp-content/uploads/2017/06/Deliver-messages-faster-in-batch.png)

Therefore “Send Batch” and “TaskCount” together, if enabled with max values (10), can help speed up the delivery up to 100 times.

![](https://www.serverless360.com/wp-content/uploads/2017/06/serverless360-activity-monitoring.png)

**Serverless360 displays the progress of the activity to Service Bus Entities.**

**Conclusion**

Based on the different scenarios for the performance or load test one can have various combination of events/message delivery using Serverless360.