QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process...
-
Upload
kassandra-stones -
Category
Documents
-
view
228 -
download
1
Transcript of QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process...
Windows Azure Service Bus
SDK 2.0 features
Agenda
New features in Azure SDK 2.0Authentication and SecurityManagement in HTML Portal
New features in SDK 2.0• OnMessage programing model• Message Browse• New enable/disable options for entities• Auto-Delete on idle
OnMessage programing modelCan replace many/most custom receive loopEvent-like/push semanticsAllows for processing at variable ratesSupports concurrent processing
Coming Soon! support for Sessions & MessageReciever
QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });
Demo: OnMessage usage
Message BrowseAllows viewing available message without lockingReturns all properties and message body (counts as a message for billing)Enables debugging and monitoring scenarios
QueueClient queueClient = QueueClient.Create("myQ");var message = queueClient.Peek(); // does not lock the messagevar message = queueClient.Peek(fromSequenceNumber: 4); //specific starting pointvar messages = queueClient.PeekBatch(messageCount: 10); // supports batching
Demo: Message Browse
New enable and disable options
Added SendDisabled and ReceiveDisabledUseful in multi-tenant appsCan pause en-queue / de-queue and bothQueueDescription qd = namespaceManager.GetQueue("myQ");qd.Status = EntityStatus.Disabled; //all operations blockedqd.Status = EntityStatus.SendDisabled; //can continue to de-queueqd.Status = EntityStatus.ReceiveDisabled; //can continue to en-queueqd.Status = EntityStatus.Active; //all operations allowednamespaceManager.UpdateQueue(qd);
Auto delete for Idle entities
Supports dynamic topologies for messagingMinimum duration is 5minsActivity includes Send-Receive as well as Metadata updates
TopicDescription topicDescription = new TopicDescription("myTopic"); topicDescription.AutoDeleteOnIdle = TimeSpan.FromMinutes(30); namespaceManager.CreateTopic(topicDescription);
Task based async APIsTask APIs as additional option to IAsyncResult operationsAllows usage of async/await semantics in .NET 4.5Client library still targets .NET 40
QueueClient queueClient = QueueClient.Create("myQ"); await queueClient.SendAsync(currentOrder);
Breaking changes in SDK 2.0
MessageBuffer APIs now removedSymmetric Server-Service developmentService Bus client library in Azure SDK 2.0 is Not compatible with Service Bus 1.0 for Windows ServerNo corresponding On-premise release at this timeSDK 1.8 remains supported for both Server and Service applicationsCan use Service Bus client library independent of any Azure SDK version usedWill release next symmetric SDK at time of on-premise Service Bus release
Authentication and Security
Shared Access Signature Authentication
Introducing support for a new “Shared Access Signature” (SAS) authentication modelAbility to configure Authorization Rules at the Service Bus namespace or entity levelAuthorization rules configured at namespace root grant rights to all entities in the namespaceEach rule has an associated key
Clients authenticate to Service Bus by signing the URI of accessed resource and an expiry with the key
SAS Configuration
SharedAccessAuthorizationRule class consists of:KeyNameRights (any of Listen, Send, Manage)Primary KeySecondary Key
SharedAccessSignature should be computed as the signature of URI of accessed resource and an Expiry with the Primary Key
Demo: SAS Auth
Azure Portal updates
New portal & Management capabilities• Updates
• Customer KPIs: Successful operations, failed operations, total operations• Configure page
• Management API docs/samples• Portal operations can be performed thru APIs• A management certificate has to be uploaded before user can access the APIs• http://msdn.microsoft.com/en-us/library/windowsazure/jj856298.aspx• Sample is coming soon!
Demo: Service Bus portal
MICROSOFT CONFIDENT IAL – INTERNAL ONLY
ResourcesService Bus SDK 2.0 Release notes
What’s new in SDK 2.0
Documentation
Subscribe!
TutorialsSamples
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.