Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Anchor
_Toc35944293
_Toc35944293
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.

Info

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

    • 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

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

Info

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

Info

Message throttling can be used in order to reduce risk of memory overflow. If number of messages in the transporter queue reaches QueueLengthThresholdHigh, Message Broker slows down in 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

    • SapDefinition - identifier of SAP system that should be used

Anchor
_Toc35944294
_Toc35944294
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.

Code Block
languagexml
<common>
	<logging>
		<factoryAdapter type="Common.Logging.NLog.NLogLoggerFactoryAdapter, Common.Logging.NLog">
			<arg key="configType" value="INLINE"/>
		</factoryAdapter>
	</logging>
</common>
<nlog>
	<targets>
		<target name="file" type="File" layout="${date:format=HH\:mm\:ss.mmm} ${level:uppercase=true} [${logger}] ${message} ${exception:format=Type,Message,StackTrace:separator= }" 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>

...