queueclient queueclient = queueclient.create("myq"); queueclient.onmessage((message) =>...
TRANSCRIPT
![Page 1: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/1.jpg)
Windows Azure Service Bus
SDK 2.0 features
![Page 2: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/2.jpg)
Agenda
New features in Azure SDK 2.0Authentication and SecurityManagement in HTML Portal
![Page 3: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/3.jpg)
New features in SDK 2.0• OnMessage programing model• Message Browse• New enable/disable options for entities• Auto-Delete on idle
![Page 4: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/4.jpg)
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 });
![Page 5: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/5.jpg)
Demo: OnMessage usage
![Page 6: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/6.jpg)
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
![Page 7: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/7.jpg)
Demo: Message Browse
![Page 8: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/8.jpg)
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);
![Page 9: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/9.jpg)
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);
![Page 10: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/10.jpg)
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);
![Page 11: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/11.jpg)
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
![Page 12: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/12.jpg)
Authentication and Security
![Page 13: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/13.jpg)
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
![Page 14: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/14.jpg)
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
![Page 15: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/15.jpg)
Demo: SAS Auth
![Page 16: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/16.jpg)
Azure Portal updates
![Page 17: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/17.jpg)
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!
![Page 18: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/18.jpg)
Demo: Service Bus portal
![Page 19: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/19.jpg)
MICROSOFT CONFIDENT IAL – INTERNAL ONLY
ResourcesService Bus SDK 2.0 Release notes
What’s new in SDK 2.0
Documentation
Subscribe!
TutorialsSamples
![Page 20: QueueClient queueClient = QueueClient.Create("myQ"); queueClient.OnMessage((message) => { //process message });](https://reader035.vdocuments.us/reader035/viewer/2022062417/55177ca05503460e6e8b533f/html5/thumbnails/20.jpg)
© 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.