In this Topic Hide
ATS Bus uses NServiceBus as its service bus framework. It's configured using ATS Bus Cockpit which allows the user to setup NserviceBus’s persistence, transport, serialization and recoverability.
Make sure that the settings are configured properly before starting a bus stop as the setup will apply to all the bus stops.
ATS Bus uses safe NServiceBus settings but the Particular ServiceControl hostname must be updated before starting the bus stops.
1. Select the General tab.
2. Click NServiceBus.
The NServiceBus dialog opens. Allowing you to configure settings for all bus stops.
NServiceBus supports multiple persistence (https://docs.particular.net/persistence/) where RavenDB is used by default although users may want to select NHibernate persistence because it uses SQL Server. The database (RavenDB or SQL) should be installed locally and not at a central location. The persistence settings are applied to all bus stops. Therefore, the database name is not unique to a bus stop but applies to all bus stops.
● RavenDB: This persistence requires a RavenDB installation and a connection string:
URL = http://<computername>:<portnumber>
For example
URL = http://localhost:8084
● NHibernate: This NServiceBus persistence requires access to an SQL Server database (minimum version = 2008). SQL Express is also supported. NHibernate requires an SQL specific connection string to connect to the database:
Data Source=localhost;Database=<DBNAME>;Integrated Security=true;
where
Data Source: The instance that hosts the database.
Database:
The name of the database, this can be an ATS Bus configuration database
or a new one. The database must be created before the bus stop is started.
The bus stop does not create the database like RavenDB does.
Integrated Security: This option
sets the logon to the account that is running the bus stop. Make sure
that this account has permissions to logon to the database instance and
that it can make changes.
ATS Bus supports the following NServiceBus transports:
● MSMQ:A connection string is not required. More information about NServiceBus and MSMQ can be found here.
● RabbitMQ: This is a broker based queueing solution. It requires a connection string. The connection string needs to comply with the following format:
host=<hostname>;UserName=<user>;Password=<password>;UseTls=true;CertPath=c:\<cert_directory>\<certname.p12>;CertPassphrase=<cert_password>
where
host: the server where RabbitMQ is installed.
UserName: A user that can access RabbitMQ. See here for more information.
Password: The password of ‘Username’.
UseTLS: A flag indicating if the connection between the bus stop and RabbitMQ should be secured. Visit the RabbitMQ website for details about setting up TLS with RabbitMQ. Visit the Particular website for more information about this item in the connectionstring.
CertPath: The directory and filename of the client certificate.
CertPassphrase: The password that belongs to the client certificate.
MSMQ transport is a standard feature in Windows that may need to be enabled. It does not require an additional application. RabbitMQ may be needed when MSMQ is not supported or when the user wants to use TLS to encrypt the messages. Messages can be encrypted using the ‘Encrypt message body’ functionality but this makes them unreadable in ServiceInsight and that is something the user does not want. Make sure to update the transport settings in the ServiceControl instance too because they have to match the transport settings of ATS Bus.
The MSMQ message transport has a message limitation of 4MB. Larger message payloads or file attachments are currently transmitted using the NServiceBus DataBus. This transport mechanism requires a shared directory that is accessible by all bus stops. The DataBus transport parameters have a specific format:
basepath=<URN_SHARED_DRIVE>;
The ‘basepath’ is a fixed property and is used to identify the shared directory. The directory should be provided as URN: ‘\\<computername\sharedDirectory>’.
This setting defines how messages are serialized on NServiceBus. Currently JSON and XML are supported where JSON is more compact than XML. JSON is the default value.
Enabling this option encrypts the NServiceBus message body making it unreadable, even in ServiceInsight. This option does a ‘last minute’ encryption/decryption of the message content. This option is useful when running in environments where there is no Active Directory that denies unauthenticated access to MSMQ queues. This option does not add that much value when using RabbitMQ with TLS.
Configure how often and at which interval messages should be retried when transmission failed. Visit the Particular website for more information.
● Immediate retries: How often to immediate retry the message.
● Delayed retries: How often to repeat the immediate retries.
This is the monitoring service for NServiceBus.Visit the Particular website for more information.
● Host: The hostname of the system where ServiceControl is installed.
● Instance: The instance of ServiceControl to use for ATS Bus. There can be multiple instances of ServiceControl on one single host.
ATS Bus allows bus stops to override the default NServiceBus Recoverability settings. It also allows plug-ins to be enabled. Each bus stop contains an NServiceBus configuration section:
● Enable heartbeat plug-in: A tool named ServicePulse shows the bus stop’s (endpoint) availability using this plug-in. The plug-in sends heartbeat messages to ServiceControl.
● Enable saga plug-in: This plug-in enables the ‘Saga’ view in ServiceInsight. Sagas are containers that can be used by various handlers to add information. Sagas are used for long running operations such as work orders. More information about the plug-in can be found on:
More information about sagas can be found online here.
● Immediate retries: How often to immediately retry the message. Remove the tick to override the default value.
● Delayed retries: How often to repeat the immediate retries. Remove the tick to override the default value.