See the below sections for information on how to import or export remote ActiveMQ servers (nsqcmactivemq.jar) in bulk using the nsqmigr utility.
Export (get) remote ActiveMQ servers
Perform the following to bulk export remote ActiveMQ servers:
-
Run a command similar to the following to create a .info containing a list of all remote ActiveMQ servers. Please note that the -a parameter must be lowercase.
nsqmigr -g -a -f<filename>.info
TIP: For a full list of commands, enter the command:nsqmigr -?
Example:
The following command will generate the file, remote_activemq.info, and will write all remote ActiveMQ servers from the workgroup server database to it. The file will be created in C:\nastel\apwmq\config\groups\remote_activemq.info.C:\nastel\apwmq\bin>nsqmigr -g -a -fC:\nastel\apwmq\config\groups\remote_activemq.info
- The .info file is now created. The default export directory is [APWMQ_HOME]/config/groups but can be overwritten by using the -O parameter.
Exported fields
All remote ActiveMQ servers and their associated fields will be written to the .info file created. The fields are as follows:
ActiveMQ::ManagerName
ParentNode
ServerName
Url
Username
UserPassword
IgnoreSSLCert
KeyStorePassword
KeyStorePath
TrustStorePassword
TrustStorePath
JmxDomainName
Example file
The following is an example of a .info file.
Import (put) remote ActiveMQ servers
Perform the following to bulk import remote ActiveMQ servers:
- You will need to create a .info file to define each remote ActiveMQ server being imported. To create this file, either:
- manually create this file to define each remote ActiveMQ server being imported. Add the fields listed in the Exported fields section above for each remote ActiveMQ server. See Example file above for a sample; or
- follow the steps in the Export (get) remote ActiveMQ servers section above to export the remote ActiveMQ servers. Update the file accordingly.
-
Place the file in:
[APWMQ_HOME]/config/groups
-
Run a command similar to the following to import the file. Please note that the -a parameter must be lowercase.
nsqmigr -p -a -f<filename>.info
Example:
The following command will import the remote ActiveMQ servers from the remote_activemq.info file located in C:\nastel\apwmq\config\groups.C:\nastel\apwmq\bin>nsqmigr -p -a -fC:\nastel\apwmq\config\groups\remote_activemq.info
- The remote ActiveMQ servers are now imported into the WGS database. The info file is automatically backed up in [APWMQ_HOME]/config/groups/workgroup/history and is not deleted.