Azure ServiceBus Queues and Topics
Upcoming SlideShare
Loading in...5
×
 

Azure ServiceBus Queues and Topics

on

  • 2,581 views

Overview of the API to control Queues and Topics in Azure AppFabric ServiceBus

Overview of the API to control Queues and Topics in Azure AppFabric ServiceBus

Statistics

Views

Total Views
2,581
Views on SlideShare
2,003
Embed Views
578

Actions

Likes
1
Downloads
6
Comments
0

4 Embeds 578

http://igorshare.wordpress.com 574
http://www.linkedin.com 2
http://feeds.feedburner.com 1
https://igorshare.wordpress.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • http://preps2.wordpress.com/2011/09/17/comparison-of-windows-azure-storage-queues-and-service-bus-queues/

Azure ServiceBus Queues and Topics Azure ServiceBus Queues and Topics Presentation Transcript

  • 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());
  •