recoverMEConfig command

Use the recoverMEConfig command to recover the configuration data of the failed or crashed messaging engine from the message store if there is no backup available. The message store could either be a database or file store system to which the previous messaging engine was connected.

This command recovers the configuration data of the messaging engine of queues and topics from the message store.

Recovery of the persistent data of the messaging engine from the message store is not possible if the configuration data on which the previous messaging engine was running is not available. This is because when a server is added as a new service integration bus member, the bus creates a new messaging engine UUID which does not match with the UUID of the previous messaging engine stored in the message store. Use this command to recover the stored UUID of the messaging engine and its configuration data of queues and topics only. The UUID of the queues and topics are recovered with default values for all other configuration properties. After the recovery of the configuration data, the persisted messages from the crashed messaging engine can be recovered and processed further.
Note: You must ensure that there is no recoverMEConfig command running before starting a new command.
The following trace messages can be used to determine whether any previous command is running:
  • CWSJA0166E: The Messaging Engine configuration recovery has started for Database : using schema : <schemaname> for jndiname: <jndiname>

    This trace message marks the start of the recovery command using database. This is the entry trace line that the user should use to confirm the start of recovery command.

  • CWSJA0166E: The Messaging Engine configuration recovery has started for File system : using logDirectory : <logDirectory> permLogDirectory : <permLogDirectory > tempLogDirectory : <tempLogDirectory>

    This trace message marks the start of the recovery command using the file system.

  • CWSJA0167E: The Messaging Engine configuration recovery for Database : using schema : <schemaname> for jndiname: <jndiname> is complete.

To run the command, use the AdminTask object of the wsadmin scripting client.

[IBM i][IBM i]The wsadmin scripting client is run from Qshell.

Command-line help is provided for service integration bus commands:
  • For a list of the available service integration bus commands in Jython and a brief description of each command, enter the following command at the wsadmin prompt:

    print AdminTask.help('SIBAdminCommands')

  • For overview help on a given command, enter the following command at the wsadmin prompt:

    print AdminTask.help('command_name')

After using the command, save your changes to the master configuration by using the following command:

AdminConfig.save()

Purpose

When a bus member (such as a server or a cluster) of the messaging engine fails or crashes, the messaging engine still has the persistent messages in the message store that can be recovered. Using this command you can recover the configuration data of the crashed or lost messaging engine in the queues and topic spaces, if the backup of the configuration data is not available.
Note: Use this command only if the backup of the configuration data of the failed or crashed messaging engine is not available.

Target object

None.

Required Parameters

-busName bus_name
The name of the service integration bus under which the previously crashed messaging engine existed. You can use the listSIBuses command to list the names of existing buses. If the bus name does not exist, then a new bus is created with the same bus name.
-messageStore messageStore type
Specify the type of the message store from which the messaging engine data must be recovered. Specify FILE to recover from file system or DB to recover from database.

If value is FILE, then the user must provide the -logDirectory, -permLogDirectory, -tempLogDirectory, -nodeName, and -serverName or -clusterName parameters.

If value is DB, then the user must provide the -dataSource, -schema, -nodeName, and -serverName or -clusterName parameters.

-nodeName nodename
Specify the name of the node on which the previous messaging engine was running. The configuration data of the previous messaging engine will be recovered under the same node name.
-serverName servername
Specify the name of the server on which the previous messaging engine was running.

If you specify the nodeName and serverName parameters, do not specify the -clusterName parameters.

-clusterName clustername
To add a server cluster as a bus member, specify the name of the cluster.

If you specify this parameter, do not specify the -nodeName and -serverName parameters.

-logDirectory logdirectoryname
The fully qualified path of the logging file directory used by message store of the perviously crashed ME. Use this parameter if the -messageStore parameter value is specified as FILE.
-permLogDirectory permanentlogdirectoryname
The fully qualified path of the permanent logging directory used by message store of the previous messaging engine to store permanent objects. Use this parameter if the -messageStore parameter value is specified as FILE.
-tempLogDirectory temporarylogdirectoryname
The fully qualified path of the temporary logging directory used by message store of the previous messaging engine to store permanent objects. Use this parameter if the -messageStore parameter value is specified as FILE.
-dataSource datasource Name
The name of the data source that the messaging engine uses to access the relational database management system (RDBMS) for the data store. Use this parameter if the -messageStore parameter value is specified as DB.
You can use $AdminConfig list DataSource to get the list of names of the DataSource objects.
Note: The -dataSource used to recover messaging engine data can be defined at sever or cell level, and if any existing recovery command is running, the user needs to ensure that it is completed before starting a new command.
-schemaName schemaname
The schema name of the database from which the messaging engine data is to be recovered. Use this parameter if the -messageStore parameter value is specified as DB.

Example

To recover the persistent data of a file system from the message store at the server level.

$AdminTask recoverMEConfig {-busName Bus01 -messageStore FILE 
-logDirectory "c:\FileStoreLogs" -permLogDirectory "c:\PermFileStoreLogs" 
-tempLogDirectory "c:\TempFileStoreLogs" -nodeName node1 -serverName server1}

To recover the persistent data of a database system from the message store at the server level.

$AdminTask recoverMEConfig {-busName bus55 -messageStore DB 
-dataSource "MyDataSource" -schemaName "server6" 
-nodeName node01 -serverName server01}

To recover the persistent data of a database system from the message store at the cluster level.

$AdminTask recoverMEConfig {-busName bus55 -messageStore DB 
-dataSource "MyDataSource" 
-schemaName "server6" -clusterName cluster01}