Contents

Profiles can also be configured through a text based properties file. These profiles can be found under the %FIORANO_HOME%\fmq\profiles directory. Profiles shipped with FioranoMQ are:

  • FioranoMQ
  • FioranoMQ_Dispatcher
  • FioranoMQ_HA_rpl/HAPrimary
  • FioranoMQ_HA_rpl/HASecondary
  • FioranoMQ_HA_shared/HAPrimary
  • FioranoMQ_HA_shared/HASecondary
  • FioranoMQ_XA
  • FioranoMQ_ClusterManager
  • StandAloneBridge
  • StandAloneRepeater

Prior to FioranoMQ 2008 SP2 release, the profiles were configured through a Configs.xml file. The profiles now can also be configured to start with certain attributes set by editing the Configs.cfg properties file. By default, the properties files are stored in the %FIORANO_HOME%\fmq\profiles%PROFILE%\conf directory.

Advantages of text based profile configuration are:

  • Easy readability
  • Earlier, the user had to edit the parameters inside tags for XML based profile configuration, now the user can edit the profiles without worrying about tags. For example, even a plain vanilla text editor like 'vi' can be used to edit the attributes that have been listed on a per line basis.
  • Fiorano Studio is now redundant for offline profile configuration in the sense that any change to the Configs.cfg file only requires a simple text editor.

The structure of a Configs.cfg file is:


Currently, the Configs.xml is present in %FIORANO_HOME%\fmq\profiles%PROFILE%\conf directory so that when the server starts it should first use the configuration settings in the xml file and then overwrites with the values set in the Configs.cfg file.

Icon

Note: Either Configs.xml or Configs.cfg should be used at all point of time. Using both may lead to unexpected behavior.

Icon

Note: Since FioranoMQ10.1.0 onwards, Configs.cfg file usage is by default disabled (renamed to Configs_cfg) to ensure that only the Configs.xml file is used, avoiding configuration clashes in few specific cases. However, based on the requirement the Configs.cfg can be restored back by renaming appropriately.

Common Usage of Configs.cfg file

In the Configs.cfg file, the statement which starts with a # (hash) character is considered to be a comment. Also, before each block starts, a short description is given about the MBean, so that the user can refer it once before modifying server settings. 

Using the Configs.cfg File

This section explains how to use a Configs.cfg file to set some common properties before the server boots up.
What follows is a list of important properties which are liable to be changed by most users and also the instructions on modifying them.

  • Property#1 Port (Server Port)
  • Property#2 Protocol (Server Protocol)
  • Property#3 AllowDurableConnections (General Server property)
  • Property#4 EnableAutoRevalidation (General Server property)
  • Property#5 IsForceFullyKillDSubscriber (PUBSUB)
  • Property#6 DupsOkBatchSize (PUBSUB)
  • Property#7 PersistentInMemoryBufferSize (PTP)
  • Property#8 EnableMonitoringThread (To enable monitoring of FioranoMQ resources)
  • Property#9 EnableRdbms (For the usage of RDBMS storage)

Consider the below examples to change the properties in Configs.cfg file.

  • To change Properties of 1 and 2, go to the block where ObjectName is:

Block to be changed:

  • To change the properties of property 3 and property 4 which are in FMQConfigLoader, go to the block where ObjectName is:

Block to be changed:

Additionally, set the attributes whichever are under the Mbean name and then start the server. As mentioned earlier, server boots up using the over-written properties which are set in Configs.cfg file.

  • Similarly, if the user needs to change the Jetty Server Configuration, go to the block and set the necessary attributes where ObjectName is:

Block to be changed:

  • To change Properties 5 and 6 which are Topic Subsystem level properties, go to following block in Configs.cfg file and change the necessary attributes.

Block to be changed:

  • Similarly for Property 7; PersistentInMemoryBufferSize, go to PTP Subsystem level Configuration, the block named as:

Block to be changed:

  • To enable/disable Property 8 monitoring thread of FioranoMQ resources used by the server, go to block and set the attribute.

Block to be changed:

  • Similarly to enable/disable Property 9 RDBMS storage, this code block needs to be changed.

Block to be changed:

Points to remember for Text based configuration

Offline configuration of any FioranoMQ profile using Admin Studio will not change the Configs.cfg properties file. The Configs.cfg property file can be modified only through normal file editing. Example, vi editor.
Text based profile configuration essentially serves the purpose for those who do not use Admin Studio for offline profile configuration. Consider these scenarios which can arise while using text based profile configuration.

  • Start FioranoMQ Server and try editing some configurable property through Web Manager Console which by default runs on any web browser and in Admin Studio. Save the configurations and shut down the server. When the same profile is modified offline using Admin Studio, and if  the server is started using the profile, then it will consider only the properties which are modified online and not the offline modified properties.
  • In the properties file, any line which starts with the character '#' is considered as a Comment and neglected while loading the properties. So, any number of blank lines and lines starting with '#' between any two properties or any two Mbeans do not corrupt the property name/value in any case as they are all neglected.
  • The property names or MBean object names should not be changed, it should match the default values as mentioned in the .cfg file. The property that is going to be set before starting the Server is dependent on the object name and the property name. Any mismatch in the property name will set the property to its default value.
  • In the .cfg file, the user needs to make sure that the object names startingTag (<) and endingTag (>) should match the particular MBean for which a property needs to be set.
  • In case, profile is being edited in the offline mode through Fiorano Studio, the changes are reflected only in the Configs.xml file and not in the Configs.cfg file, as mentioned earlier. So, in order to start the FioranoMQ Server using the latest changes, please follow either of the below mentioned ways before starting the FioranoMQ Server using this profile.
    • Rename Configs.cfg file present in $PROFILE/conf directory to some other file name say Configs_cfg and start FioranoMQ Server using this profile so that changes in the Configs.xml file are only included.
    • Incorporate all the changes done for the parameters through Fiorano Studio, by going through the Configs.xml file, into the Configs.cfg file in the respective Mbean blocks. When started FioranoMQ Server now, the latest changes in the configuration will now be included.
  • Consider these two cases, one of them can take care of backward compatibility.
    • Suppose both Configs.xml and Configs.cfg is present in the conf folder of the profile, then first server is loaded using properties set in Configs.xml and then overwrites the properties set in the .cfg file. In this case, if the Configs.cfg file is not present in the folder then it will load properties only from Configs.xml file (backward compatible).
    • And for other profiles, where only Configs.cfg is present, the server boots up normally using the properties file. So, any changes of the .cfg file will get reflected when the server is started.

Once the configurations are saved in online mode using either Studio or Web Console, the changes are reflected both in the Configs.xml and Configs.cfg files (only if the files were already present in the conf directory).

HA centric properties in Configs.cfg file

This section explains about the commonly used properties in HA Replicated and Shared servers that have been grouped together to necessitate easier changing of these properties. These properties can only be found in the beginning of the Configs.cfg file of their respective HA servers. These properties which have been listed below are the ones that are frequently changed by users of FioranoMQ HA servers.

  • FMQGroup.BackupServerIp - Specifies the backup server IP. This IP is configured in backup-url for default connection factories.
  • FMQGroup.BackupServerPort - Specifies the backup server port. This port is configured in backup-url for default connection factories.
  • FMQGroup.BackupHAPort - Specifies the port of the Backup Peer server on which peer is listening for status requests sent by this server.
  • FMQGroup.BackupHAIPAddress - Specifies IP address of backup peer server in HA mode. This parameter is mandatory to run HA.
  • FMQGroup.Port - Specifies the port on which HA Manager would listen for connections from the HA peer server.
  • FMQGroup.PingInterval - Specifies time interval (in milliseconds) after which the remote server is pinged.
  • FMQGroup.LockFile - Specifies full path of the file which will be used for determining the HA states. This file should be present in the third machine and always be available to the HA servers with all permissions. The LockFile machine must be same as the machine whose IP Address is given as GatewayServerIPAddress.
  • FMQGroup.SocketCreationTimeout - In HA, specifies the  time in milliseconds within which socket has to created with the peer server failing which the socket creation attempt will fail.

 

Adaptavist ThemeBuilder EngineAtlassian Confluence