Download presentation
Presentation is loading. Please wait.
1
Azure ServiceBus SQLRelay 2016 Stuart Moore
2
PREMIER SPONSOR GOLD SPONSORS SILVER SPONSORS BRONZE SPONSORS SUPPORTERS
3
Me Stuart Moore Working with MS products for >20 years
Chapter leader for East Midlands Pass Blog: Github:
4
Demos in this Session Lots of code!
Some PowerShell Mostly C# Demo code is in a Github Repository: Will leave on screen at end. We may not get through it all!
5
Useful things Service Bus Explorer
Desktop tool to explore your configurations and peek at messages PowerShell wrapper scripts for Queues, Topic and Subscription Creation All Courtesy of Paolo Salvatori -
6
What is Azure Service Bus
It’s a messaging service Flexible message format Guaranteed Delivery Deliver options First in First Out (ordered) Asynchronous Multiple distribution types One to One One to Many Many to Many
7
As it’s in Azure No setup overhead, just create it and go.
Scaling is purely down to your budget and can be done in minutes Resilience built in
8
What’s the use case for a ServiceBus
With today’s IT solutions, there’s quite a few architecture problems which can be solved using a service bus…...
9
Problem 1 – Cross Boundary
Large enterprise database already exists perfectly happily on premises Business want the flexibility of deploying apps into Azure, but don’t want to expose or migrate the existing database Data needs to get into the on premise db quicker than a batch load provides
10
Problem 2 – Load Levelling
Your business experiences sudden massive spikes in transactions, but you don’t want to throttle or over provision, ie; Ticket sellers Time base activities (end of quarter submissions) By using the ServiceBus your developers can accept the requests and know that they will eventually make their way into their database
11
Problem 3 - Decoupling In a 24/7 world people expect to be able to order their favourite coffee online at any time, but we know databases occasionally need some downtime (migration, upgrades, etc) So using a queue allows you to decouple the systems so you can take sections offline transparently
12
Messages Basic Entity of Service Bus Consists of:
Key/Value pairs properties Mandatorys Custom Max 64kb total size Body: can be binary Total size of body and headers: Standard: 256KB Premium:1 MB
13
Partitions By default a topic or queue is handled by a single broker and a single message store. By enabling partitions Azure will spread your messages across multiple brokers and stores. This increases the maximum size of your queues, and throughput. No extra charge, just storage costs. But it can cause some issues. No guarantee you’ll get the the same broker every request, so message ordering not guaranteed. Use a sessionID or PartitionID to get around that.
14
Message Queues Simplest use case Generate a queue under your namespace
Queue is a singular entity Multiple sources can post to the queue But there is only one queue that messages can be polled from!
15
Topics and Subscriptions
Topics receive messages from 1 or more sources These messages are then delivered into subscriptions It is possible to drop messages before they hit a subscription Recievers then collect messages from a subscription. More flexible than messages and makes dealing with multiple receivers much easier
16
Filtered Subscriptions
Each subscription can have a filter on it, so it only sees the messages you want it to see. Can filter on any property, so using a custom property header is very simple (see demo) They are optional, so it’s possible to send the entire topic to multiple subscriptions. Can be good for an audit trail, or to save a representative workload for later replay.
17
Gotchas Guarentee is that a message will be delivered at LEAST once. Systems should be designed so a second delivery isn’t a problem Be aware that ordering can fail for a number of reasons, so design to cope There are many ways to do things! The best one may not be obvious. Design for flexibility and script things for easy tear down and rebuild.
18
Please give us your feedback:
sqlrelay.co.uk/feedback Thank you
19
Round UP Feel free to get in touch:
Blog: Demo Code –
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.