nservicebus_for_admins
DESCRIPTION
Deck for introduction IT Admins to NSB and what they need to know to support the productTRANSCRIPT
![Page 1: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/1.jpg)
NSERVICEBUS FOR ADMINS
![Page 2: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/2.jpg)
Integration Framework Patterns
2
![Page 3: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/3.jpg)
Broker
Broker
AppApp
App
App
App
![Page 4: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/4.jpg)
Bus
Bus
App
Bus
App
Bus
App
Bus
App
![Page 5: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/5.jpg)
Messaging Patterns
![Page 6: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/6.jpg)
Publish & Subscribe
Subscriptions Publisher
BusSubscriber
Bus
Subscriber
Bus
Subscriber
![Page 7: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/7.jpg)
Bus
Bus
Request & Response
Client
Bus
Response
Request
![Page 8: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/8.jpg)
Distributor
Work Management
Distributor
Bus
Worker
Bus
Worker
Bus
Worker
![Page 9: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/9.jpg)
Saga(Workflow)
StatePersistence
Main Business Process Bus
Sub Process
3
Bus
Sub Process
1 BusSub
Process 2
![Page 10: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/10.jpg)
Site 2Site 1
Gateway
Gateway Gateway
HTTP
ClientServer
![Page 11: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/11.jpg)
Messaging/Integration Framework Selection Criteria• Features
• Publish/Subscribe• Work Distribution• Long Running Business Workflows
• Lives on existing infrastructure• Low Learning Curve• Actively supported• Cost Effective
![Page 12: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/12.jpg)
Selected Framework• NServiceBus
• Open Source• Feature Rich• Built on MSMQ, MSDTC, and .NET
![Page 13: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/13.jpg)
NServiceBus Architecture
![Page 14: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/14.jpg)
Required Software• MSMQ• MSDTC• NSB Bits• .NET Framework 3.5 SP1• RDBMS
• Subscription Storage• Very small, SQL Server will do
![Page 15: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/15.jpg)
Monitoring• PerfMon Counters
• NSB• “Critical Time” – how long has the oldest message been sitting in the
queue
• Logs• SCOM
• MSMQ• Error Queue
![Page 16: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/16.jpg)
Logging• Configurable & managed by the developer• Includes standard mechanisms
• Files• Event Log• Database• Custom…
![Page 17: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/17.jpg)
Installation• NServiceBus.Host.exe
• [/install (installs as a Windows Service)• [/serviceName] (name in the registry)• [/displayName] (display name in Mgr)• [/description] (description in Mgr)• [/instance] (another named instance)• [/startManually] (don’t start the service)• [/username] (account it runs as)• [/password] (password of above user)• [ProfileName] (name of the profile to use)
![Page 18: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/18.jpg)
Profiles• Modifies host behavior on startup
• Logging• Subscription Storage
• Can Create Custom Profiles• OOTB Profiles
• Lite: Console app, verbose logging, memory subscription storage
• Integration: Console app, informational logging, MSMQ subscription storage
• Production: Windows Service, error logging, database subscription storage
![Page 19: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/19.jpg)
Uninstallation• NServiceBus.Host.exe
• [/uninstall• [/serviceName]• [/instance]]
![Page 20: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/20.jpg)
Application Level MSMQ Configuration
• <MsmqTransportConfig• InputQueue="client“
• Queue messages are being received on
• ErrorQueue="error“• Queue error messages are sent to
• NumberOfWorkerThreads="1“• Number of threads used to process messages
• MaxRetries="5“• Max number of times to try and process a message
• />
![Page 21: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/21.jpg)
Subscription Storage Configuration• <MsmqSubscriptionStorageConfig Queue="subscriptions" />
• Queue to look for subscriptions
• <DBSubscriptionStorageConfig>• <NHibernateProperties>
• <add Key="connection.provider" Value="NHibernate.Connection.DriverConnectionProvider"/>
• <add Key="connection.driver_class" Value="NHibernate.Driver.SqlClientDriver"/>
• <add Key="connection.connection_string" Value="Server=.;Database=nservicebussubscriptions;Trusted_Connection=True;"/>
• <add Key="dialect" Value="NHibernate.Dialect.MsSql2005Dialect"/>
• </NHibernateProperties>
• </DBSubscriptionStorageConfig>
![Page 22: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/22.jpg)
Tools• ReturnToSourceQueue.exe
• Replays messages to the queue they came from
• Runner.exe• Validates and fixes MSMQ installations• Starts MSDTC if necessary• Installs NSB performance counters
![Page 23: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/23.jpg)
Running in a Cluster• You need to add the .NET Framework feature or
application server role to the member servers• You need to add both a MSDTC and a MSMQ resource to
the cluster (MSMQ will require that you have MSDTC)• After adding the Generic Application for
NServiceBus.Host.exe, you will need to go in and modify the properties of the generic application to check the "Use Network Name for computer name" box so that NServiceBus points to the cluster name for using MSMQ not to the member server that is currently running it.
![Page 24: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/24.jpg)
Questions?
![Page 25: NServiceBus_for_Admins](https://reader035.vdocuments.us/reader035/viewer/2022062405/554f76c9b4c9052a518b47af/html5/thumbnails/25.jpg)
Pub/Sub Mechanics
Publisher
OutboundSubscriptions
Inbound
Subscriber1
Outbound
Inbound
Subscriber2
Outbound
Inbound
Errors
Inbound
ReturnToSourceQueue.exe