Introduction#
This is the second part of a three part series on algorithmic runtime comparison. For the full intro check out the first post.
Today we convert our HTTP Trigger into a ServiceBusTopic Trigger that reads from ServiceBus, runs the merge algorithm, writes output to Azure Blob Storage, and writes performance data to Azure Table Storage.
Key Changes#
The function now takes a MergingArray message from ServiceBus instead of an HTTP request. Since arrays are too large for Table Storage columns (64kb limit), we write them to Blob Storage as text files and only write performance metrics to Table Storage.
The function.json binds a serviceBusTrigger input (with topic name and subscription), Table Storage output, and Blob Storage output.
Testing#
A Console App sends 100 requests to MergeTrigger, which fans out to the ServiceBus subscriptions. Using Azure Storage Explorer, you can inspect the Merging table for performance data and the merging blob container for full input/output files.






Conclusion#
We converted our HTTP Trigger to use ServiceBus Topics as input. Part 3 adds the remaining three algorithms and analyzes the performance differences.
