1 / 45

Neues in MSMQ 3.0

Neues in MSMQ 3.0 . Wie geht es weiter in der nachrichtenbasierten Welt?. Zur Person. Dipl. Inf. Marcel Gnoth, MCSD www.gnoth.net NTeam GmbH, Berlin www.nteam.de Leiter Softwareentwicklung MS Gold Partner Busines Intelligence, Information Worker, Advanced Infrastructur

rayya
Download Presentation

Neues in MSMQ 3.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Neues in MSMQ 3.0 Wie geht es weiter in der nachrichtenbasierten Welt?

  2. Zur Person • Dipl. Inf. Marcel Gnoth, MCSD • www.gnoth.net • NTeam GmbH, Berlin • www.nteam.de • Leiter Softwareentwicklung • MS Gold Partner Busines Intelligence, Information Worker, Advanced Infrastructur • Autor dotnetpro und dotnet-magazin • Trainer (u.a. SPC Berlin, www.spc.de ) • Themen • VB6, COM • Datenbanken, Yukon • Verteilte Informationssysteme mit .Net • Office System 2003 Integration • Reisen in ferne Länder: www.gnoth.net/reise.htm

  3. Agenda • Einleitung MSMQ • Neues in Version 3 • Trigger • HTTP • Multiple Destination Delivery • … • MSMQ und Indigo – wie geht es weiter …? • Indigo …? • SQL-Service Broker …? • Fazit

  4. Einleitung

  5. Message Queueing • Briefe zwischen Computern versenden

  6. Einführung Konzepte • Asynchrone Abarbeitung von Aufgaben • Empfänger oder Sender kann Offline sein • Nachrichten werden zwischengepuffert • Aktiver Austausch von Informationen • zwischen Programmen / Computern • Pushen der Infos • Workflows • Offline

  7. Einleitung / Basics • Bestandteil des Win2k / WinXP Setup • Nicht Standardinstallation • Active Directory • Ohne AD-> Workgroup Modus, nur Private Queues • Computerverwaltung • SnapIn • VS.net Integration • Server Explorer

  8. Öffnen einer Queue • MessageQueue.Create (Path As String) • New MessageQueue (Path As String) • MessageQueue.Exists (Path As String) Imports System.Messaging Private WithEvents m_JobQueue As MessageQueue Sub Test() m_JobQueue = New MessageQueue _ ("Gengar\Private$\Jobs") End Sub Dim mqs As MessageQueue() = _ MessageQueue.GetPrivateQueuesByMachine("Gengar")

  9. Öffnen mit FormatName • Offline Mode, ohne MQIS • Schnellste und flexibelste Methode FormatName:Public=5A5F7535-AE9A-41d4-935C-845C2AFF7112 FormatName:DIRECT=SPX:NetworkNumber;HostNumber\QueueName FormatName:DIRECT=TCP:IPAddress\QueueName FormatName:DIRECT=HTTP://MSMQComputer/msmq/MyPublicQueue FormatName:DIRECT=HTTPS://MSMQComputer/msmq/MyPublicQueue FormatName:DIRECT=OS:MachineName\QueueName FormatName:DIRECT=OS:MachineName\Private$\QueueName Dim myQueue As New MessageQueue _ ("FormatName:DIRECT=OS:Gengar\private$\Jobs")

  10. Senden einer Nachricht • Queue öffnen • Send Methode mit einem Objekt aufrufen • Objekt wird serialisiert <Serializable()> Public Class Job • XML ist Standardformat • z.B. DataSets verschicken • Eigenes Message – Objekt verwenden • Konfiguration vieler Parameter msgQ.Send(myObject, "Message Label")

  11. Nachricht empfangen • Receive • BeginReceive • Asynchrones Empfangen Dim msg As Message = mqResults.Receive() mqResults.BeginReceive() Private Sub mqResults_ReceiveCompleted(..., _ ByVal e As ...ReceiveCompletedEventArgs) _Handles mqResults.ReceiveCompleted Dim myMsg As System.Messaging.Message myMsg = e.Message End Sub

  12. Eigenschaften • Offline fähig • Journal • Timeouts • Acknowledgements • Transaktionen • Interne und DTC

  13. MENU Neues in MSMQ 3.0 Messaging entwickelt sich weiter

  14. Neue Feature in MSMQ 3.0 • Nachrichtentransport über HTTP • Ich sage nur Port 80 … • SOAP Extensions for Reliable Messaging • Load Balancing, Webfarms • Trigger • Jetzt Bestandteil von MSMQ 3.0 • Nachrichten an mehrere Empfänger senden • Publisher / Subscriber • Real-Time Messaging Multicast , Distribution Lists • Message lookup • Suchen nach Nachrichten ohne Cursur mit einer 64-bit lookup ID , schnellster Zugriff • Liste: http://www.microsoft.com/windows2000/technologies/communications/msmq/30features.asp

  15. Verbesserte Features in MSMQ 3.0 • AD Integration • Konfiguration im AD • Clients verwenden LDAP • MMC Support • Workgroup Mode Support • Cluster Support • CE Support • MSMQ Nachrichtenspeicher jetzt (theoretisch) 1TB • Schnellerer Neustart, auch wenn große persistente Nachrichten vorliegen

  16. Programmierschnittstelle für die Verwaltung • Statistiken über Messages • Überwachen des MSMQ hop-to-hop transactional messaging Protokols • Überwachen und steuern des MSMQ Dienstes • Pause und Start für Queues • Nachverfolgung von MSMQ Nachrchtenvon der Quelle bis zum Ziel • Viele Funktionen nur als COM- oder C-Schnittstelle • Nicht alles über .Net Framework verfügbar 

  17. HTTP Transport über das Internet Wer braucht schon Webservices 

  18. Einleitung MSMQ + HTTP • Transport über http, https + SOAP • http Unterstützung muß beim Setup ausgewählt werden, IIS auf dem Empfänger! • Neues virtuelles Verzeichnis wird angelegt http://localhost/msmq/ • Nur senden, kein Lesen von remote queues • Gleiche Limitation haben Webservices • SOAP Header kann ausgelesen werden Dim s As String = String.Format _ ("FormatName:Direct=http://{0}/msmq/Private$/{1}", strCom, strQue) Dim mq As MessageQueue = New MessageQueue(s) mq.Send(txtBody.Text, txtLabel.Text) “FormatName:Direct=http://CHIHIRO/msmq/Private$/httptest”

  19. Hardened MSMQ mode • MSMQ “lauscht” nicht direkt an irgendwelchen Ports • Akzeptiert nur Nachrichten über IIS • Alle augehenden Queues, die nicht über HTTP gehen sind gesperrt • Nachrichten können plaziert werden, werden aber nicht gesendet, bis der hardened Mode aufgehoben ist

  20. Demo Senden über HTTP

  21. Trigger Aktionen beim Eintreffen von Nachrichten auslösen

  22. Was sind Trigger? • Windows Dienst (mqtgsvc.exe) • Verwendet Regeln • Aktion • COM Komponente • (.net) Exe • Parameterübergabe

  23. Trigger Objekte • Trigger • kann mehrere Rules enthalten • Condition • Eigenschaften der Nachricht werden beim Eintreffen geprüft • Mehrere Kombinationen möglich • Action • Eine Exe oder eine COM-Komponente • Parameterübergabe kann definiert werden • Rule • Paar von Condition und Action

  24. Trigger neu anlegen • Über Computerverwaltung • Triggers Admin Utility for MSMQ

  25. Demo Trigger

  26. Multiple Destinations Senden einer Nachricht an mehrere Empfänger

  27. Multiple Destinations • Wege • Distribution Lists • Multiple-Element Format Names • Multicast Addresses • Jede Nachrichtenkopie hat die gleiche ID • Kein Tracing • Keine AcknowledgeMessages • Kein .Net API, COM oder C • Es kann eine Liste von ResponseQueues mitgegeben werden • MSMQMessage.ResponseDestination , MSMQDestination

  28. Senden über Distribution Lists • Listen im Active Directory • Public Queues, Queue Aliases, andere Distribution Lists Private Sub SendingToDL(ByVal strADsPathDL As String)' Declare Message Queuing objects.Dim dest As New MSMQDestination Dim msg As New MSMQMessage' Obtain an MSMQDestination object.dest.ADsPath = strADsPathDLOn Error GoTo ErrorHandler msg.Label = "Test Message“ msg.Send(DestinationQueue:=dest) dest.close() Exit SubErrorHandler: MsgBox(Err.Description End Sub

  29. Senden über Multiple Element Format Names • Private Listen mit Warteschlangen • Kombination aus beliebigen Direct-Formatnames • Mehrere FormatNames werden duch Kommata getrennt verknüpft ' Create multiple-element format name.strFormatName1 = "DIRECT=OS:" & "Chihiro" & "\private$\" & "Gengar“strFormatName2 = "Direct=http://Chihiro/msmq/Private$/Enton“strFormatName3 = "Direct=http://192.168.0.5/msmq/Private$/Bisasam“strFormatName4 = "DIRECT=TCP:" & "192.168.0.5" & "\private$\" & "Onix“strMultipleElement = strFormatName1 & "," & strFormatName2 & "," & _ strFormatName3 & "," & strFormatName4'Set format name of MSMQDestination object.dest.FormatName = strMultipleElement' Set the message label.msg.Label = "Test Message MultElFormNam - " + Now.ToShortTimeString' Send the message and close the MSMQDestination object.msg.Send(DestinationQueue:=dest)dest.Close()

  30. Senden über Multicast Adressen • Eine Multicastausgangsqueue • Multicast Session über TCP Transport • MSMQQueueInfo.MulticastAddress • class D range (224.0.0.0 to 239.255.255.255 ) • Zum Erzeugen einer Multicastadresse für eine Queue • MSMQQueueInfo.Update aufrufenum Änderung zu speichern • Keine transaktionalenNachrichten • Pragmatic General Multicast(PGM) Protokol

  31. Mulitcast – Code Beispiel Const MULTI_CAST_ADR As String = "234.1.1.1:4455“Const qiDest1 As String = "Chihiro\private$\Gengar“Const qiDest2 As String = "Chihiro\private$\Enton“ qi = New MSMQ.MSMQQueueInfoqi.PathName = qiDest1qi.Refresh()qi.MulticastAddress = MULTI_CAST_ADRqi.Update() qi = New MSMQ.MSMQQueueInfoqi.PathName = qiDest2qi.Refresh()qi.MulticastAddress = MULTI_CAST_ADRqi.Update() Dim dest As New MSMQ.MSMQDestinationDim msg As New MSMQ.MSMQMessage dest.FormatName = "MULTICAST=" + MULTI_CAST_ADRmsg.Label = "Test Message Multicast Adr - " + Now.ToShortTimeStringmsg.Send(DestinationQueue:=dest)dest.Close()

  32. Demo Multiple Destinations

  33. Best Practices • Lesen von remote Queues vermeiden • MSMQ ist für remote Senden und lokales Lesen designed • Zugriffe aufs AD vermeiden • Lieber Private als Public Queues • Verwenden Sie Time Outs • Berücksichtigen Sie die Grenzen der asynchronous notification • Setzen Sie Transaktionen mit Bedacht ein • Verwenden Sie ACKs oder NAKs

  34. Indigo in der Zukunft • Nächste Windowsversion Longhorn ca. 2007 • WinFS • Avalon (GUI) • Indigo (Kommunikation) • Indigo soll die verschiedenen Kommunikationstechnologien zusammenführen, nicht abschaffen • DCOM, MSMQ, WS, Remoting, Enterprise Services (COM+) • Dienstorientierte Architektur (SOA) steht im Vordergrund

  35. Queuing Eventing Routing Presentation Data Communication Avalon WinFS Indigo ASP.NET Windows Forms Windows Forms ADO.NET Collaboration Document UI Media Object T/SQL XML Service Models Schemas Connectivity Messaging Services Services Controls Interop Engine Desktop Window Manager Adaptive UI Engine Desktop Services People and Groups ObjectSpaces People Group Channels (Datagram, Reliable, Peer, …) Policy Engine Synchronization(WinFS, Win32..) Calendar Media Page/SiteComposition Presentation Object Manager Desktop Composition Engine Application Services DataSet Collaboration History Document … Channel Security Data Model Media Services Transport Channels (IPC, HTTP, TCP…) InfoAgent (PreferenceRules..) Message Encoder SQL XML Real-Time Activities Items Animation andComposition MediaProcessing Capture and Sourcing Designer Services Personalization and Profiling Services System Services Relationships FileSystem Services (MetaDataHandlers..) Communications Manager (Port) Transaction Framework Providers Signaling Hardware Rendering Software Rendering and Sinks Controls Membership and Security Services Extensions Federation CLR Base Operating System Services Base Class Libraries Network Class Library Memory Manager Code Execution Loader Security Serialization Application Deployment Engine (Click-Once) Network Services Demand Activation and Protocol Health Hosting Layer PNRP Native WiFi SIP Transactions Storage TCP Listener UDP Listener IPC Listener Identity & Security System Management GDI/GDI+ Window Manager Global Audio Engine DirectXGraphics Backup / Restore File Replication Service Virtual Disk Service Lightweight Transactions TransactionCoordinator Internet Connection Firewall Graphics drivers Protocols DDI Input Manager Audio Drivers DirectX Graphics Mini port Redirectors Distributed File System Filter Manager Cache Manager KernelTransactionManager LoggingService Filter Engine TPC, UDP IPV4, IPV6 IPSEC QOS HTTP Listener Transacted NTFS Universal Data Format FAT 16/32 Plug andPlay MemoryManager PowerManager ConfigManager Process Manager SecurityReference Monitor LPCFacility IO Manager Device Drivers Kernel Mode 802.3 802.11 .. Kernel SCSI/FC Hardware Abstraction Layer Make the connection

  36. TransactedMethods Instance Manager Context Manager ServiceMethods TypeIntegration DeclarativeBehaviors ASP.NET .container .exe NT Service DllHost Indigo Architecture Messaging Services Service Model Queuing Routing Connector Eventing Channels (Datagram, Reliable, Peer, …) Policy Engine … Channel Security Transport Channels (IPC, HTTP, TCP…) Message Encoder System Services Transaction Communications Manager (Port) Federation Hosting Environments …

  37. Indigo Connector • Von außen sichtbar • Services • Messages • SOAP Nachrichten • Intern • Ports • URI Bezeichner • Channels • Transportiert zwischen Ports • TCP, HTTP, ICP, MSMQ

  38. Upgraded Upgraded MSMQ MSMQ Web Services Existing Upgraded Expose as a Web Service MSMQ Server Wire Interop Client Server API API MSMQ MSMQ MSMQ / SRMP Soap Reliable Messaging Protocol

  39. MSMQ Binary Migration Details • Requirements • Upgrade the platform • Avoid • Nothing: The full set of MSMQ features will interop • Will not be supported • Nothing: The full set of MSMQ features will interop

  40. FAQ: What is the future of MSMQ and messaging technologies at Microsoft? • A. The next version of MSMQ will be delivered as a component of the next version of Windows (code-named "Longhorn") and will interoperate with Indigo, the name for a collection of new programming frameworks. Indigo will be the framework of choice for building connected systems and will include powerful, reliable messaging capabilities. • Other messaging technologies include Message Queuing (code named "MSMQ-T"), a feature in Microsoft BizTalk® Server 2004. In addition, the next version of Microsoft SQL Server™ (code-named Yukon) includes a feature called Service Broker.

  41. FAQ: What is Indigo? • A. Windows "Longhorn" will include a new communications infrastructure built around the Web services architecture, Indigo. Indigo provides a simple, powerful framework for transacted messaging with the best possible interoperability on the Windows server platform. The Indigo framework provides a rich, extensible feature set for reliable messaging, including tight and loose coupling models, durable or volatile storage, configurable delivery guarantees, and deployment flexibility. • For more information, see the Indigo page on the MSDN Windows "Longhorn" Developer Center Web site.

  42. FAQ: What is BizTalk Server 2004 Message Queuing? • A. BizTalk Server 2004 includes Message Queuing, an adapter for MSMQ that enables high-performance interoperability between MSMQ applications and BizTalk Server. "Message Queuing" refers to this adapter, not a general-purpose reliable messaging technology. • Message Queuing is used to integrate an MSMQ application with BizTalk Server 2004. For example, if an integration application uses BizTalk Server to orchestrate incoming Web services requests with an existing MSMQ application, BizTalk Server is leveraged for format and transport modification. • For more information, see the BizTalk Server Web site.

  43. FAQ: What is the SQL Server Service Broker? • A. SQL Server "Yukon" includes Service Broker, a feature for database developers that facilitates building queuing semantics into SQL Server "Yukon" applications. For example, Service Broker could be used for a system which coordinates data processing among multiple SQL Server "Yukon" servers such that entries in a master customer database result in queued record transfer to a branch office. Or Service Broker could be used for a database application that stores and forwards records to another "Yukon" server for processing. • For more information about the SQL Server "Yukon" release, see the SQL Server 2005 Web site. For information about specific features, including Service Broker, see An Overview of SQL Server "Yukon" for the Database Developer.

  44. Links • Artikel auf www.gnoth.net http://www.gnoth.net/Job/Publikationen.htm • Send MSMQ Messages Securely Across the Internet with HTTP and SOAP http://msdn.microsoft.com/msdnmag/issues/03/12/MSMQandNET/default.aspx • Newsgroups auf nntp://msnews.microsoft.com

  45. Uff... Alles wird gut 

More Related