Message Broker configuration file must be stored in the config directory located in the main application directory. The file name is MessageBrokerSettings.yaml. The file is in the YAML format. Exemplary config file can be found here Message Broker config example in YAML. The configuration applies both Windows and Linux versions of Message Broker.
Application settings
Config file is divided into following sections (names are self-explanatory) and each of them contains list of parameters which are described below.
Password and PasswordSecure - in each section where password is needed only one of these parameters should be used. PasswordSecure contains password encrypted using Cloud Manager tool and Password is an open text version ❗
CloudSettings
ConnectorVersion - contains internal connector version number and there is no need to change it
DirectoryServiceUrl - should be left empty unless connecting to QT or ET cloud
ConfirmationBundlingSize - upper limit of confirmation in single package
ConfirmationBundlingTimeoutMillisecs - timeout for collecting confirmations
Proxy - proxy setting, needs to filled when proxy is used
Host - proxy host
Port - proxy port
User - proxy user
Password - proxy password
PasswordSecure - encrypted proxy password
Following the parameter control behaviour of sending the confirmations to FSM. When enabled, confirmations are send in packages containing not more messaged then defined by ConfirmationBundlingSize. The second parameter ConfirmationBundlingTimeoutMillisecs tells how long message broker should wait for completing the packages - if time out is reached confirmations are sent no matter how many of them ware packed
Engine
FailoverEnabled - enables and disables the failover mechanism in message broker, by default it is disabled
WebServiceDefinition
UserName - user name SAP should use to authenticate to the web service
Password - password SAP should use to authenticate to the web service
PasswordSecure - password SAP should use to authenticate to the web service
ListenPort - port at which web service of Message Broker should be accessible to SAP
UrlPath - URL at which web service of Message Broker should be accessible to SAP
Https:
Enabled - possible values: true or false. Enables or disables
CertificateFile
Path - certificate file
Password - certificate password
PasswordSecure - certificate password
CertificateStore
StoreName - name of a certificate store that should be used
Location - certificate store location
CertificateSubject - certificate subject
MaxRequestBodySize - it defines max size of http request, web service will accept. If not provided, .NET default is used, which is 30000000 (around 28 MB). If MaxRequestBodySize is set to 0, no limit is applied
ResetResendAfterSecsIfNoResponse - If, after sending the ‘resend request’ there is no resend response (resend messages or ‘resend end’), after interval specified by ResetResendAfterSecsIfNoResponse resend is considered as failed and a new resend request is sent. If this parameter is not set then default values are used: 0 (disabled) in on premise and 180 (3 minutes) in Cloud Foundry environment.
CertificateFile takes precedence over CertificateStore, if both are defined. In the production pick one that fits your environment and remove or comment out the other.
Basically, in Linux you are forced to use CertificateFile, while on Windows you can use either file or store, with CertificateStore having the advantage, you do not need to provide the private key password.
CloudAccounts
Id - FSM Cloud account Id
AccessToken - access ttoken generated with Cloud Manager
QueueLengthThresholdHigh
QueueLengthThresholdLow
QueueThrottlingMaxWaitSecs
Message throttling can be used to reduce the risk of memory overflow - following three parameters control the behaviour of it.
If number of messages in the transporter queue reaches QueueLengthThresholdHigh, Message Broker slows down receiving new messages, until the count gets below QueueLengthThresholdLow. Message Broker will take additional QueueThrottlingMaxWaitSecs seconds to process each received message, when in throttling mode. If QueueLengthThresholdHigh, QueueLengthThresholdLow, QueueThrottlingMaxWaitSecs values are not provided, throttling is disabled.
SapDefinitions
Id - this is an identifier of SAP system which is used in the companies' definition
UserName - user name (usually a technical user) used for authentication to SAP system by Message Broker
Password - password associated with the used user to access SAP system
PasswordSecure - encrypted password associated with the used user to access SAP system
Url - URL, at which SAP web service is registered to be called
HttpsCertificateFingerprint - if SAP HTTPS certificate is not trusted by itself (e.g. not signed by trusted CA or not added to trusted certificate store) Message Broker can trust it if its fingerprint matches HttpsCertificateFingerprint
Companies
Id - identifier of cloud company as defined in Cloud Manager
CloudAccount - name of the cloud account that should be used (must be the one defined above)
SapDefinition - identifier of SAP system that should be used (must be the one of the defined above)
Password and PasswordSecure - in each section where password is needed only one of these parameters should be used. PasswordSecure contains password encrypted using Cloud Manager tool and Password is an open text version ❗
Logging
Next to the MessageBrokerSettings.yaml file in the config directory there should be another file nlog.config. Message Broker uses common logging library (http://netcommon.sourceforge.net/) in conjunction with NLog (http://nlog-project.org/). In a nutshell: common logging is a factory that hides from the application the actual logging implementation. It is capable to do a simple logging to a console, or so. For more advanced logging setup, it needs a backing library (NLog, log.net, or similar). In case of E4C Message Broker, NLog has been chosen. It is capable to log to file (including file rolling), system event log, console, etc. It is a matter of configuration to replace NLog for any library of a preference. The logging configuration (output file/directory, information being logged, log severity threshold, etc.) is configurable in the file too. In Message Broker configuration file, the logging configuration can be found near the bottom of the file. A sample configuration is presented below. Here NLog is configured to a file. The file is put to c:\tmp\e4c.log directory and is rolled (a new log file is created) every day. Logs produced by Spring.NET package are stored if their level is Info or above. Other logs are created with Trace level, which makes every log sent to a file and console. You may want to edit the log settings and switch off the console logging, change directory, where the log files are created, change logging level, to save some disk space, etc.
<nlog> <targets> <target name="file" type="File" layout="${date:format=HH\:mm\:ss.fff} ${level:uppercase=true} [${logger}] ${message} ${exception:format=type,message,stacktrace:maxInnerExceptionLevel=10:innerExceptionSeparator=\ncaused by :innerFormat=shortType,message,stacktrace}" fileName="c:/tmp/e4c.log/${shortdate}.log" /> </targets> <rules> <logger name="Spring.*" final="true" minlevel="Info" writeTo="file"/> <logger name="*" minlevel="Trace" writeTo="file"/> </rules> </nlog>