3.X - Message Broker application config file

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 3.X - 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.
      In the Message Broker 3.5 this property became obsolete and is no more present in the configuration file. Existing entries will be ignored

    • 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

Learn about the authorizations required for the technical user: FSM technical user authorization in ERP

  • 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.61 MB). If MaxRequestBodySize is set to 0, no limit is applied. Maximal value for MaxRequestBodySize is 2147483647 (2048MB)

    • 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.

  • CloudAccounts

    • Id - FSM Cloud account Id

    • AccessToken - access ttoken generated with Cloud Manager

    • QueueLengthThresholdHigh

    • QueueLengthThresholdLow

    • QueueThrottlingMaxWaitSecs

  • 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)

 

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. Old logs will get removed after 30 days. 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" maxArchiveDays="30" 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>

 

If you'd like to help us improve the documentation, please provide your feedback using the communication channels listed /wiki/spaces/PFCC/pages/1561427969. Learn about support possibilities here.