320 likes | 502 Views
Get On The Bus. Chris Klug – Code Ninja chris@activesolution.se | @ ZeroKoll http://chris.59north.com/. Who am I?. Assumptions. What is the Windows Azure Service Bus?. 2 features and a kicker. Relayed Messaging 101. Client. Service. Service Bus. Demo.
E N D
Get On The Bus Chris Klug – Code Ninja chris@activesolution.se | @ZeroKoll http://chris.59north.com/
What is the Windows Azure Service Bus? 2 features and a kicker
Client Service Service Bus
Demo Creating a relayed service
Discovery ...built into the Service Bus...
Demo Making a service discoverable
LoadbalancingRelayed Calls ...just add a second service...or third...or...
Demo Loadbalancing a relayed service
HTTP API ...everyone’sfavorite API...
Demo Making the IsItFridayHTTP-based
Queues & Topics Service Bus Client Service
2 Main Features Queues | Topics & Subscriptions
Service Bus Queues • 256kb Payload limit • 1-5Gb storage limit • Long-polling in client • Two retrieval models • PeekLock, ReceiveAndDelete • Supports deadlettering
Queues – Message Retrieval • ReceiveAndDelete • Retrieves and Deletes message in one • PeekLock • Retrieves and locks message • Complete(), Abandon(), Defer() or Deadletter()
Demo Using Service Bus Queues
Topics & Subscriptions Subscription Subscription Topic Service Bus Service Bus Service Bus Service Client Client Client Client
Topics & Subscriptions • Create a Topic • Publisher sends messages to Topic • Service Bus forwards messages toSubscriptions • Subscribersretrieve and handle messages from Subscriptions
Topics & Subscriptions – Cont. • Builds on Service Bus Queues • Relies on BrokeredMessage • Supports same features • Deadlettering, retrieval mode etc per Subscription
Demo Using Service Bus Topics
Subscription Filters • Filters Topic messages based on SQL statement • Declared at Subscription creation time
Demo Adding a Subscription Filter
Deadlettering • Poison messages • MaxDeliveryCount • EnableDeadLetteringOnMessageExpiration • BrokeredMessage.TimeToLive • <Target>.DefaultMessageTimeToLive • Deadletter • MyQueue/$DeadLetterQueue • <Target>Client.FormatDeadLetterPath() • Queue must be emptied!!!
Demo Usingdeadlettering
Autoforwarding Supplier=‘MrZog’ Supplier=‘MrZog’ Supplier=‘MrZog’ Region=‘Europe’ Region=‘Asia’ Region=‘Usa’ OrdersUsa MrZog MrZog MrZog OrdersAsia Topic Queue Subscription OrdersEurope Client Usa MrZog Asia Orders Europe
Demo Usingautoforwarding
Thank you! Any Questions? Chris Klug chris@activesolution.se | @ZeroKoll http://chris.59north.com/