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 S...
 
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 multiplex...
1 2 3
var  queueClient =  factory .CreateQueueClient(queueName); queueClient.Send(message); queueClient.BeginSend(message, DoneS...
var  queueClient =    factory .CreateQueueClient(queueName,  ReceiveMode .ReceiveAndDelete ); var  message = queueClient.R...
var  queueClient =    factory .CreateQueueClient(queueName,  ReceiveMode .PeekLock ); var  message = queueClient.Receive(T...
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 ...
Filter conditions operate on message properties  and are expressed in SQL’92 syntax  SET AuditRequired = 1 Filters actions...
 
 
 
 
var  policy = new  RetryPolicy <SqlAzureTransientErrorDetectionStrategy>(MaxRetries,  TimeSpan .FromMilliseconds(DelayMs))...
 
Upcoming SlideShare
Loading in...5
×

Azure ServiceBus Queues and Topics

2,169

Published on

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

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,169
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • http://preps2.wordpress.com/2011/09/17/comparison-of-windows-azure-storage-queues-and-service-bus-queues/
  • Azure ServiceBus Queues and Topics

    1. 1. Igor Moochnick Director, Cloud Platforms BlueMetal Architects [email_address] Blog: igorshare.wordpress.com
    2. 6. Broker Broker
    3. 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
    4. 9. Broker Message Body Properties
    5. 11. 1 2 3
    6. 12. Management operations on the namespace Create/Delete/Exists for Queues, Topics, and Subscriptions 1 2 3 4
    7. 13. Creates client objects to interact with Queues, Topics, and Subscriptions. Anchor for connection management and multiplexing. 1 2 3 4
    8. 14. 1 2 3
    9. 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 .
    10. 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.
    11. 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
    12. 18. Management operations on the namespace Create/Delete/Exists for Queues, Topics, and Subscriptions 1 2 3
    13. 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
    14. 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
    15. 25. var policy = new RetryPolicy <SqlAzureTransientErrorDetectionStrategy>(MaxRetries, TimeSpan .FromMilliseconds(DelayMs)); policy.ExecuteAction(() => object.DoSomething());
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×