SlideShare a Scribd company logo
Igor Moochnick Director, Cloud Platforms BlueMetal Architects [email_address]   Blog:  igorshare.wordpress.com
 
 
 
 
Broker Broker
See: http://bit.ly/tY96CZ  Feature Azure Queues Brokered Messaging API REST, .NET .NET, REST, WCF Authentication Storage Service HMAC Service Bus ACS Maximum queue size 100TB 5GB Maximum message size 64KB 256KB Maximum message TTL 7 days 10,675,199 days At most once delivery No Yes At least once delivery Yes Yes Maximum message lock 7 days 5 minutes Hosted service affinity Yes No Receive behavior Non-blocking Long polling (<24 days) Throughput 5,000 msgs/second 800-3,000 msgs/sec
 
Broker Message Body Properties
 
1 2 3
Management operations on the namespace Create/Delete/Exists for  Queues, Topics, and Subscriptions 1 2 3 4
Creates client objects to interact with Queues, Topics, and Subscriptions. Anchor  for connection management and multiplexing.  1 2 3 4
1 2 3
var  queueClient =  factory .CreateQueueClient(queueName); queueClient.Send(message); queueClient.BeginSend(message, DoneSending, queueClient); void  DoneSending( IAsyncResult  ar) { var  queueClient = ( QueueClient )ar.AsyncState; queueClient.EndSend(ar); } var  sender =  factory .CreateMessageSender(queueName); sender.Send(message); 1 2 3 Sending messages is done with Send or Begin/EndSend. You can send on the QueueClient or TopicClient or the neutral  MessageSender .
var  queueClient =    factory .CreateQueueClient(queueName,  ReceiveMode .ReceiveAndDelete ); var  message = queueClient.Receive(TimeSpan.FromMinutes(1)); if ( message != null )  {    … queueClient.BeginReceive(TimeSpan.FromMinutes(1), DoneReceiving, queueClient); void  DoneReceiving( IAsyncResult  ar) { var  queueClient = ( QueueClient )ar.AsyncState; var  message = queueClient.EndReceive(ar); if ( message != null )    {    … 1 2 Destructive receives remove the messages from the queue as it is being taken from the broker. Higher throughput than Peek/Lock, but risk of message loss.
var  queueClient =    factory .CreateQueueClient(queueName,  ReceiveMode .PeekLock ); var  message = queueClient.Receive(TimeSpan.FromMinutes(1)); if ( message != null )  {   try {   .. processing work .. message.Complete(); } catch { message.Abandon(); throw ; } 1
Management operations on the namespace Create/Delete/Exists for  Queues, Topics, and Subscriptions 1 2 3
var  subClient =    factory .CreateSubscriptionClient(topicName, subName,   ReceiveMode .ReceiveAndDelete ); var  message = subClient.Receive(TimeSpan.FromMinutes(1)); if ( message != null )  {    … var  rcv =  factory .CreateMessageReceiver(   SubscriptionClient .FormatSubscriptionPath(topicName, subName),   ReceiveMode .ReceiveAndDelete ); var  message = rcv.Receive(TimeSpan.FromMinutes(1)); if ( message != null )  {    … 1 2
Filter conditions operate on message properties  and are expressed in SQL’92 syntax  SET AuditRequired = 1 Filters actions may modify/add/remove properties as  message is selected
 
 
 
 
var  policy = new  RetryPolicy <SqlAzureTransientErrorDetectionStrategy>(MaxRetries,  TimeSpan .FromMilliseconds(DelayMs));  policy.ExecuteAction(() => object.DoSomething());
 

More Related Content

What's hot

Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SPPrimeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Zabbix BR
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
Mu Chun Wang
 
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
Severalnines
 

What's hot (19)

Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
 
BSides Rochester 2018: Chaim Sanders: Easily Deploying and Optimizing Open So...
BSides Rochester 2018: Chaim Sanders: Easily Deploying and Optimizing Open So...BSides Rochester 2018: Chaim Sanders: Easily Deploying and Optimizing Open So...
BSides Rochester 2018: Chaim Sanders: Easily Deploying and Optimizing Open So...
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
Netty from the trenches
Netty from the trenchesNetty from the trenches
Netty from the trenches
 
Mobile Programming - 3 UDP
Mobile Programming - 3 UDPMobile Programming - 3 UDP
Mobile Programming - 3 UDP
 
TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at Scale
 
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloVarnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
 
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SPPrimeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
 
Meteorjs - Futuristic web framework
Meteorjs - Futuristic web frameworkMeteorjs - Futuristic web framework
Meteorjs - Futuristic web framework
 
Network Sniffing
Network SniffingNetwork Sniffing
Network Sniffing
 
Mobile Programming - Network Universitas Budi Luhur
Mobile Programming - Network Universitas Budi LuhurMobile Programming - Network Universitas Budi Luhur
Mobile Programming - Network Universitas Budi Luhur
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
 
Random musings on SSL/TLS configuration
Random musings on SSL/TLS configurationRandom musings on SSL/TLS configuration
Random musings on SSL/TLS configuration
 
Asynchronous Python with Twisted
Asynchronous Python with TwistedAsynchronous Python with Twisted
Asynchronous Python with Twisted
 
How we use Twisted in Launchpad
How we use Twisted in LaunchpadHow we use Twisted in Launchpad
How we use Twisted in Launchpad
 
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
Webinar Slides: Become a MongoDB DBA (if you’re really a MySQL user)
 
An introduction to node3
An introduction to node3An introduction to node3
An introduction to node3
 
What is the ServiceStack?
What is the ServiceStack?What is the ServiceStack?
What is the ServiceStack?
 

Viewers also liked (7)

Nadal musica usc_def
Nadal musica usc_defNadal musica usc_def
Nadal musica usc_def
 
дед морозы
дед морозыдед морозы
дед морозы
 
Associatie heineken
Associatie heinekenAssociatie heineken
Associatie heineken
 
Рукапісы татараў Беларусі канца 17 - пачатку 20 стагоддзя з фондаў Цэнтральна...
Рукапісы татараў Беларусі канца 17 - пачатку 20 стагоддзя з фондаў Цэнтральна...Рукапісы татараў Беларусі канца 17 - пачатку 20 стагоддзя з фондаў Цэнтральна...
Рукапісы татараў Беларусі канца 17 - пачатку 20 стагоддзя з фондаў Цэнтральна...
 
Se aplica a
Se  aplica aSe  aplica a
Se aplica a
 
Aislados sensibilidad y militancia en defensa de los ultimos
Aislados sensibilidad y militancia en defensa de los ultimosAislados sensibilidad y militancia en defensa de los ultimos
Aislados sensibilidad y militancia en defensa de los ultimos
 
Constituintes Da MatéRia Viva 4
Constituintes Da MatéRia Viva 4Constituintes Da MatéRia Viva 4
Constituintes Da MatéRia Viva 4
 

Similar to Azure ServiceBus Queues and Topics

A Scalable I/O Manager for GHC
A Scalable I/O Manager for GHCA Scalable I/O Manager for GHC
A Scalable I/O Manager for GHC
Johan Tibell
 
The Pillars Of Concurrency
The Pillars Of ConcurrencyThe Pillars Of Concurrency
The Pillars Of Concurrency
aviade
 
香港六合彩 &raquo; SlideShare
香港六合彩 &raquo; SlideShare香港六合彩 &raquo; SlideShare
香港六合彩 &raquo; SlideShare
biyu
 
Baocao Web Tech Java Mail
Baocao Web Tech Java MailBaocao Web Tech Java Mail
Baocao Web Tech Java Mail
xicot
 
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Lucidworks
 

Similar to Azure ServiceBus Queues and Topics (20)

Preview of Apache Pulsar 2.5.0
Preview of Apache Pulsar 2.5.0Preview of Apache Pulsar 2.5.0
Preview of Apache Pulsar 2.5.0
 
Brokered Messaging in Windows Azure
Brokered Messaging in Windows AzureBrokered Messaging in Windows Azure
Brokered Messaging in Windows Azure
 
Celery
CeleryCelery
Celery
 
Privilege Escalation with Metasploit
Privilege Escalation with MetasploitPrivilege Escalation with Metasploit
Privilege Escalation with Metasploit
 
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir DresherCloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
 
GopherFest 2017 talk - Adding Context to NATS
GopherFest 2017 talk - Adding Context to NATSGopherFest 2017 talk - Adding Context to NATS
GopherFest 2017 talk - Adding Context to NATS
 
Gopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATSGopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATS
 
A Scalable I/O Manager for GHC
A Scalable I/O Manager for GHCA Scalable I/O Manager for GHC
A Scalable I/O Manager for GHC
 
Hands on: Hystrix
Hands on: HystrixHands on: Hystrix
Hands on: Hystrix
 
The Pillars Of Concurrency
The Pillars Of ConcurrencyThe Pillars Of Concurrency
The Pillars Of Concurrency
 
Azure Cloud Patterns
Azure Cloud PatternsAzure Cloud Patterns
Azure Cloud Patterns
 
Python twisted
Python twistedPython twisted
Python twisted
 
Celery with python
Celery with pythonCelery with python
Celery with python
 
Architectures with Windows Azure
Architectures with Windows AzureArchitectures with Windows Azure
Architectures with Windows Azure
 
香港六合彩 &raquo; SlideShare
香港六合彩 &raquo; SlideShare香港六合彩 &raquo; SlideShare
香港六合彩 &raquo; SlideShare
 
Baocao Web Tech Java Mail
Baocao Web Tech Java MailBaocao Web Tech Java Mail
Baocao Web Tech Java Mail
 
Solr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachSolr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approach
 
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
 
Practical non blocking microservices in java 8
Practical non blocking microservices in java 8Practical non blocking microservices in java 8
Practical non blocking microservices in java 8
 
Axis2 Landscape
Axis2 LandscapeAxis2 Landscape
Axis2 Landscape
 

More from Igor Moochnick

Tips for building responsive cloud applications
Tips for building responsive cloud applicationsTips for building responsive cloud applications
Tips for building responsive cloud applications
Igor Moochnick
 
Building complex single page application should be as enjoyable as visit to a...
Building complex single page application should be as enjoyable as visit to a...Building complex single page application should be as enjoyable as visit to a...
Building complex single page application should be as enjoyable as visit to a...
Igor Moochnick
 
Amazon 101 - building composite responsive apps - small
Amazon 101 - building composite responsive apps - smallAmazon 101 - building composite responsive apps - small
Amazon 101 - building composite responsive apps - small
Igor Moochnick
 
Ccr - Concurrency and Coordination Runtime
Ccr - Concurrency and Coordination RuntimeCcr - Concurrency and Coordination Runtime
Ccr - Concurrency and Coordination Runtime
Igor Moochnick
 
NO SQL: What, Why, How
NO SQL: What, Why, HowNO SQL: What, Why, How
NO SQL: What, Why, How
Igor Moochnick
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
Igor Moochnick
 
Best practices for agile design
Best practices for agile designBest practices for agile design
Best practices for agile design
Igor Moochnick
 
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Igor Moochnick
 
Building lean products with distributed agile teams
Building lean products with distributed agile teamsBuilding lean products with distributed agile teams
Building lean products with distributed agile teams
Igor Moochnick
 
Building Gwt Clients For Cloud Apps.Pptx
Building Gwt Clients For Cloud Apps.PptxBuilding Gwt Clients For Cloud Apps.Pptx
Building Gwt Clients For Cloud Apps.Pptx
Igor Moochnick
 

More from Igor Moochnick (20)

Continuous delivery workflow with Docker
Continuous delivery workflow with DockerContinuous delivery workflow with Docker
Continuous delivery workflow with Docker
 
Being a generalist and being great at what you do
Being a generalist and being great at what you doBeing a generalist and being great at what you do
Being a generalist and being great at what you do
 
The journey to container adoption in enterprise
The journey to container adoption in enterpriseThe journey to container adoption in enterprise
The journey to container adoption in enterprise
 
Dev ops overview (brief)
Dev ops overview (brief)Dev ops overview (brief)
Dev ops overview (brief)
 
Dev ops cd tool chains
Dev ops cd tool chainsDev ops cd tool chains
Dev ops cd tool chains
 
Orchestration musings
Orchestration musingsOrchestration musings
Orchestration musings
 
Delivery pipelines
Delivery pipelinesDelivery pipelines
Delivery pipelines
 
Tips for building responsive cloud applications
Tips for building responsive cloud applicationsTips for building responsive cloud applications
Tips for building responsive cloud applications
 
Building complex single page application should be as enjoyable as visit to a...
Building complex single page application should be as enjoyable as visit to a...Building complex single page application should be as enjoyable as visit to a...
Building complex single page application should be as enjoyable as visit to a...
 
Amazon 101 - building composite responsive apps - small
Amazon 101 - building composite responsive apps - smallAmazon 101 - building composite responsive apps - small
Amazon 101 - building composite responsive apps - small
 
Ccr - Concurrency and Coordination Runtime
Ccr - Concurrency and Coordination RuntimeCcr - Concurrency and Coordination Runtime
Ccr - Concurrency and Coordination Runtime
 
RavenDB overview
RavenDB overviewRavenDB overview
RavenDB overview
 
NO SQL: What, Why, How
NO SQL: What, Why, HowNO SQL: What, Why, How
NO SQL: What, Why, How
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
Best practices for agile design
Best practices for agile designBest practices for agile design
Best practices for agile design
 
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
Caliburn.micro jump start composite applications for WPF, Silverlight and WP7
 
Building lean products with distributed agile teams
Building lean products with distributed agile teamsBuilding lean products with distributed agile teams
Building lean products with distributed agile teams
 
Practical alm testing
Practical alm   testingPractical alm   testing
Practical alm testing
 
Putting SOAP to REST
Putting SOAP to RESTPutting SOAP to REST
Putting SOAP to REST
 
Building Gwt Clients For Cloud Apps.Pptx
Building Gwt Clients For Cloud Apps.PptxBuilding Gwt Clients For Cloud Apps.Pptx
Building Gwt Clients For Cloud Apps.Pptx
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

Azure ServiceBus Queues and Topics

  • 1. Igor Moochnick Director, Cloud Platforms BlueMetal Architects [email_address] Blog: igorshare.wordpress.com
  • 2.  
  • 3.  
  • 4.  
  • 5.  
  • 7. See: http://bit.ly/tY96CZ Feature Azure Queues Brokered Messaging API REST, .NET .NET, REST, WCF Authentication Storage Service HMAC Service Bus ACS Maximum queue size 100TB 5GB Maximum message size 64KB 256KB Maximum message TTL 7 days 10,675,199 days At most once delivery No Yes At least once delivery Yes Yes Maximum message lock 7 days 5 minutes Hosted service affinity Yes No Receive behavior Non-blocking Long polling (<24 days) Throughput 5,000 msgs/second 800-3,000 msgs/sec
  • 8.  
  • 9. Broker Message Body Properties
  • 10.  
  • 11. 1 2 3
  • 12. Management operations on the namespace Create/Delete/Exists for Queues, Topics, and Subscriptions 1 2 3 4
  • 13. Creates client objects to interact with Queues, Topics, and Subscriptions. Anchor for connection management and multiplexing. 1 2 3 4
  • 14. 1 2 3
  • 15. var queueClient = factory .CreateQueueClient(queueName); queueClient.Send(message); queueClient.BeginSend(message, DoneSending, queueClient); void DoneSending( IAsyncResult ar) { var queueClient = ( QueueClient )ar.AsyncState; queueClient.EndSend(ar); } var sender = factory .CreateMessageSender(queueName); sender.Send(message); 1 2 3 Sending messages is done with Send or Begin/EndSend. You can send on the QueueClient or TopicClient or the neutral MessageSender .
  • 16. var queueClient = factory .CreateQueueClient(queueName, ReceiveMode .ReceiveAndDelete ); var message = queueClient.Receive(TimeSpan.FromMinutes(1)); if ( message != null ) { … queueClient.BeginReceive(TimeSpan.FromMinutes(1), DoneReceiving, queueClient); void DoneReceiving( IAsyncResult ar) { var queueClient = ( QueueClient )ar.AsyncState; var message = queueClient.EndReceive(ar); if ( message != null ) { … 1 2 Destructive receives remove the messages from the queue as it is being taken from the broker. Higher throughput than Peek/Lock, but risk of message loss.
  • 17. var queueClient = factory .CreateQueueClient(queueName, ReceiveMode .PeekLock ); var message = queueClient.Receive(TimeSpan.FromMinutes(1)); if ( message != null ) { try { .. processing work .. message.Complete(); } catch { message.Abandon(); throw ; } 1
  • 18. Management operations on the namespace Create/Delete/Exists for Queues, Topics, and Subscriptions 1 2 3
  • 19. var subClient = factory .CreateSubscriptionClient(topicName, subName, ReceiveMode .ReceiveAndDelete ); var message = subClient.Receive(TimeSpan.FromMinutes(1)); if ( message != null ) { … var rcv = factory .CreateMessageReceiver( SubscriptionClient .FormatSubscriptionPath(topicName, subName), ReceiveMode .ReceiveAndDelete ); var message = rcv.Receive(TimeSpan.FromMinutes(1)); if ( message != null ) { … 1 2
  • 20. Filter conditions operate on message properties and are expressed in SQL’92 syntax SET AuditRequired = 1 Filters actions may modify/add/remove properties as message is selected
  • 21.  
  • 22.  
  • 23.  
  • 24.  
  • 25. var policy = new RetryPolicy <SqlAzureTransientErrorDetectionStrategy>(MaxRetries, TimeSpan .FromMilliseconds(DelayMs)); policy.ExecuteAction(() => object.DoSomething());
  • 26.  

Editor's Notes

  1. http://preps2.wordpress.com/2011/09/17/comparison-of-windows-azure-storage-queues-and-service-bus-queues/