Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Marcel Gnoth, NTeam GmbH www.gnoth.net Neues in MSMQ 3.0 Wie geht es weiter in der nachrichtenbasierten Welt?

Ähnliche Präsentationen


Präsentation zum Thema: "Marcel Gnoth, NTeam GmbH www.gnoth.net Neues in MSMQ 3.0 Wie geht es weiter in der nachrichtenbasierten Welt?"—  Präsentation transkript:

1 Marcel Gnoth, NTeam GmbH Neues in MSMQ 3.0 Wie geht es weiter in der nachrichtenbasierten Welt?

2 Marcel Gnoth, NTeam GmbH Zur Person Dipl. Inf. Marcel Gnoth, MCSD –www.gnoth.netwww.gnoth.net NTeam GmbH, Berlin –www.nteam.dewww.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:

3 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH Einleitung

5 Marcel Gnoth, NTeam GmbH Message Queueing Briefe zwischen Computern versenden

6 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH Ö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 Marcel Gnoth, NTeam GmbH Ö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 Marcel Gnoth, NTeam GmbH Senden einer Nachricht Queue öffnen Send Methode mit einem Objekt aufrufen –Objekt wird serialisiert Public Class Job –XML ist Standardformat –z.B. DataSets verschicken –Eigenes Message – Objekt verwenden Konfiguration vieler Parameter msgQ.Send(myObject, "Message Label")

11 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH Eigenschaften Offline fähig Journal Timeouts Acknowledgements Transaktionen –Interne und DTC

13 Marcel Gnoth, NTeam GmbH MENU Neues in MSMQ 3.0 Messaging entwickelt sich weiter

14 Marcel Gnoth, NTeam GmbH 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:

15 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH 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 Nachrchten von der Quelle bis zum Ziel Viele Funktionen nur als COM- oder C-Schnittstelle –Nicht alles über.Net Framework verfügbar

17 Marcel Gnoth, NTeam GmbH HTTP Transport über das Internet Wer braucht schon Webservices

18 Marcel Gnoth, NTeam GmbH 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 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 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 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH Demo Senden über HTTP

21 Marcel Gnoth, NTeam GmbH Trigger Aktionen beim Eintreffen von Nachrichten auslösen

22 Marcel Gnoth, NTeam GmbH Was sind Trigger? Windows Dienst (mqtgsvc.exe) Verwendet Regeln Aktion – COM Komponente –(.net) Exe Parameterübergabe

23 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH Trigger neu anlegen Über Computerverwaltung Triggers Admin Utility for MSMQ

25 Marcel Gnoth, NTeam GmbH Demo Trigger

26 Marcel Gnoth, NTeam GmbH Multiple Destinations Senden einer Nachricht an mehrere Empfänger

27 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH 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 = strADsPathDL On Error GoTo ErrorHandler msg.Label = "Test Message msg.Send(DestinationQueue:=dest) dest.close() Exit Sub ErrorHandler: MsgBox(Err.Description End Sub

29 Marcel Gnoth, NTeam GmbH 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:// /msmq/Private$/Bisasam strFormatName4 = "DIRECT=TCP:" & " " & "\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 Marcel Gnoth, NTeam GmbH Senden über Multicast Adressen Eine Multicastausgangsqueue Multicast Session über TCP Transport MSMQQueueInfo.MulticastAddress –class D range ( to ) –Zum Erzeugen einer Multicastadresse für eine Queue –MSMQQueueInfo.Update aufrufen um Änderung zu speichern Keine transaktionalen Nachrichten Pragmatic General Multicast (PGM) Protokol

31 Marcel Gnoth, NTeam GmbH Mulitcast – Code Beispiel Const MULTI_CAST_ADR As String = " :4455 Const qiDest1 As String = "Chihiro\private$\Gengar Const qiDest2 As String = "Chihiro\private$\Enton qi = New MSMQ.MSMQQueueInfo qi.PathName = qiDest1 qi.Refresh() qi.MulticastAddress = MULTI_CAST_ADR qi.Update() qi = New MSMQ.MSMQQueueInfo qi.PathName = qiDest2 qi.Refresh() qi.MulticastAddress = MULTI_CAST_ADR qi.Update() Dim dest As New MSMQ.MSMQDestination Dim msg As New MSMQ.MSMQMessage dest.FormatName = "MULTICAST=" + MULTI_CAST_ADR msg.Label = "Test Message Multicast Adr - " + Now.ToShortTimeString msg.Send(DestinationQueue:=dest) dest.Close() Const MULTI_CAST_ADR As String = " :4455 Const qiDest1 As String = "Chihiro\private$\Gengar Const qiDest2 As String = "Chihiro\private$\Enton qi = New MSMQ.MSMQQueueInfo qi.PathName = qiDest1 qi.Refresh() qi.MulticastAddress = MULTI_CAST_ADR qi.Update() qi = New MSMQ.MSMQQueueInfo qi.PathName = qiDest2 qi.Refresh() qi.MulticastAddress = MULTI_CAST_ADR qi.Update() Dim dest As New MSMQ.MSMQDestination Dim msg As New MSMQ.MSMQMessage dest.FormatName = "MULTICAST=" + MULTI_CAST_ADR msg.Label = "Test Message Multicast Adr - " + Now.ToShortTimeString msg.Send(DestinationQueue:=dest) dest.Close()

32 Marcel Gnoth, NTeam GmbH Demo Multiple Destinations

33 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH Indigo in der Zukunft Nächste Windowsversion Longhorn ca –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 Marcel Gnoth, NTeam GmbH Base Operating System Services CLR TransactionsStorage Protocols Network Services Kernel Mode Base Class Libraries Memory Manager Hosting Layer Code Execution Loader Security Serialization Lightweight Transactions Lightweight Transactions Transaction Coordinator Kernel Transaction Manager Logging Service Kernel Hardware Abstraction Layer Process Manager Process Manager Security Reference Monitor LPC Facility Memory Manager Power Manager Config Manager Plug and Play Transacted NTFS Transacted NTFS Cache Manager Cache Manager Universal Data Format Universal Data Format Filter Engine Filter Engine TPC, UDP IPV4, IPV6 TPC, UDP IPV4, IPV6 IPSEC QOS HTTP Listener HTTP Listener Internet Connection Firewall Demand Activation and Protocol Health PNRP Native WiFi Native WiFi SIP TCP Listener TCP Listener UDP Listener UDP Listener IPC Listener IPC Listener Network Class Library GDI/GDI+ Window Manager Window Manager Global Audio Engine Global Audio Engine DirectX Graphics Graphics drivers DDI Input Manager Input Manager Audio Drivers Audio Drivers DirectX Graphics Mini port DirectX Graphics Mini port Redirectors SCSI/FC Device Drivers Management PresentationDataCommunication WinFSIndigo Make the connection Windows Forms Avalon ASP.NET ObjectSpaces DataSet SQL XML Providers Framework Services Schemas Data Model ADO.NET Connectivity Synchronization (WinFS, Win32..) InfoAgent (PreferenceRules..) InfoAgent (PreferenceRules..) FileSystem Services (MetaDataHandlers..) FileSystem Services (MetaDataHandlers..) Calendar Media Document … … Items Relationships Extensions Communications Manager (Port) Messaging Services Transport Channels (IPC, HTTP, TCP…) Transport Channels (IPC, HTTP, TCP…) IO Manager Channels (Datagram, Reliable, Peer, …) Policy Engine Policy Engine Message Encoder Message Encoder Channel Security Channel Security Queuing Eventing Routing Transaction Desktop Services Desktop Services Desktop Window Manager Desktop Window Manager Presentation Object Manager Desktop Composition Engine Animation and Composition Media Services Hardware Rendering Hardware Rendering Media Processing Capture and Sourcing Capture and Sourcing Software Rendering and Sinks Software Rendering and Sinks Adaptive UI Engine Adaptive UI Engine Page/Site Composition Personalization and Profiling Services Personalization and Profiling Services Membership and Security Services Membership and Security Services Designer Services Designer Services Controls Interop Engine Controls Interop Engine Controls Windows Forms Application Services Application Services Application Deployment Engine (Click-Once) Application Deployment Engine (Click-Once) People Group Identity & Security System Identity & Security System Collaboration People and Groups People and Groups Collaboration History Collaboration History Real-Time Activities Real-Time Activities Signaling Federation System Services FAT 16/32 Filter Manager Filter Manager Distributed File System Distributed File System Backup / Restore Backup / Restore File Replication Service File Replication Service Virtual Disk Service Virtual Disk Service Models Service Object T/SQL XML Document UI Media

36 Marcel Gnoth, NTeam GmbH Connector Communications Manager (Port) Transport Channels (IPC, HTTP, TCP…) Transport Channels (IPC, HTTP, TCP…) Channels (Datagram, Reliable, Peer, …) Policy Engine Policy Engine Message Encoder Message Encoder Channel Security Channel Security Service Model Hosting Environments Instance Manager Context Manager Type Integration Service Methods Declarative Behaviors Transacted Methods ASP.NET.container.exe NT Service DllHost Messaging Services System Services Queuing Routing Eventing … … Transaction Federation … … Indigo Architecture

37 Marcel Gnoth, NTeam GmbH Indigo Connector Von außen sichtbar –Services –Messages SOAP Nachrichten Intern –Ports URI Bezeichner –Channels Transportiert zwischen Ports TCP, HTTP, ICP, MSMQ

38 Marcel Gnoth, NTeam GmbH MSMQ Server Wire Interop Client API MSMQ MSMQ / SRMP API MSMQ Server Web Services MSMQ Expose as a Web Service MSMQ Upgraded ExistingUpgraded Soap Reliable Messaging Protocol

39 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH 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 In addition, the next version of Microsoft SQL Server (code-named Yukon) includes a feature called Service Broker.

41 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH 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 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 Marcel Gnoth, NTeam GmbH 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 Marcel Gnoth, NTeam GmbH Links Artikel auf Send MSMQ Messages Securely Across the Internet with HTTP and SOAP Newsgroups auf nntp://msnews.microsoft.com nntp://msnews.microsoft.com

45 Marcel Gnoth, NTeam GmbH Alles wird gut Uff...


Herunterladen ppt "Marcel Gnoth, NTeam GmbH www.gnoth.net Neues in MSMQ 3.0 Wie geht es weiter in der nachrichtenbasierten Welt?"

Ähnliche Präsentationen


Google-Anzeigen