You can use properties files to create or change IBM MQ topic properties.
Before you begin
Determine the changes that you want to make to your IBM MQ topic configuration.
Start
the wsadmin scripting tool. To start wsadmin using the Jython language,
run the wsadmin -lang Jython command from the bin directory
of the server profile.
About this task
Using a properties file, you can create, modify, or delete a IBM MQ topic object and its
configuration properties.
Run administrative commands using wsadmin to create or change a properties file for a IBM MQ
topic, validate the properties, and apply them to your configuration.
Table 1. Actions for IBM MQ topic properties files. You can create, modify, and delete IBM MQ topic configuration properties.Action |
Procedure |
create |
Set properties and then run the applyConfigProperties command. |
modify |
Edit properties and then run the applyConfigProperties command. |
delete |
Uncomment #DELETE=true and run the deleteConfigProperties
command. |
Optionally, you can use interactive mode
with the commands:
AdminTask.command_name('-interactive')
Procedure
- Create a IBM MQ topic and its properties.
- Create a properties file for an MQTopic object.
Open an editor and create an MQ topic properties file. You can copy the example properties file
in this step into an editor and modify the properties as needed for your situation.
An example properties file for an MQTopic object with a JNDI name of
topicJndiName under a JMSProvider named IBM MQ JMS Provider at the
cell scope follows:
#
# Header
#
ResourceType=MQTopic
ImplementingResourceType=GenericType
ResourceId=Cell=!{cellName}:JMSProvider=WebSphere MQ JMS Provider:MQTopic=jndiName#topicJndiName
#DELETE=true
#
#Properties
#
wildcardFormat=topicWildcards #ENUM(characterWildcards|allWildcards|topicWildcards),default(topicWildcards)
readAhead=YES #ENUM(QUEUE_DEFINED|YES|NO),default(YES)
specifiedExpiry=0 #long,default(0)
baseTopicName=topicBaseTopicName #required
brokerPubQmgr=null
providerType=null #readonly
decimalEncoding=Normal #ENUM(Normal|Reversed),default(Normal)
expiry=APPLICATION_DEFINED #ENUM(APPLICATION_DEFINED|SPECIFIED|UNLIMITED),default(APPLICATION_DEFINED)
sendAsync=YES #ENUM(QUEUE_DEFINED|YES|NO),default(YES)
integerEncoding=Normal #ENUM(Normal|Reversed),default(Normal)
brokerPubQueue=null
specifiedPriority=0 #integer,default(0)
jndiName=topicJndiName #required
CCSID=0 #integer,default(0)
category=null
description=null
brokerVersion=V1 #ENUM(V2|V1),default(V1)
brokerCCDurSubQueue=null
brokerDurSubQueue=null
boolean=null
targetClient=JMS #ENUM(JMS|MQ),default(JMS)
priority=APPLICATION_DEFINED #ENUM(APPLICATION_DEFINED|SPECIFIED|QUEUE_DEFINED),default(APPLICATION_DEFINED)
provider=IBM MQ JMS Provider #ObjectName(JMSProvider),readonly
persistence=APPLICATION_DEFINED #ENUM(APPLICATION_DEFINED|HIGH|NONPERSISTENT|PERSISTENT|QUEUE_DEFINED),default(APPLICATION_DEFINED)
floatingPointEncoding=IEEENormal #ENUM(IEEENormal|IEEEReversed|S390),default(IEEENormal)
readAheadClose=DELIVERALL #ENUM(DELIVERCURRENT|DELIVERALL),default(DELIVERALL)
multicast=AS_CF #ENUM(AS_CF|DISABLED|NOT_RELIABLE|RELIABLE|ENABLED),default(AS_CF)
name=topicName #required
EnvironmentVariablesSection
#
#
#Environment Variables
cellName=WASCell06
- Run the applyConfigProperties command to create an MQTopic configuration.
Running the applyConfigProperties command applies the properties file to the configuration. In
this Jython example, the optional -reportFileName parameter produces a report named
report.txt:
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt '])
- Modify an existing IBM MQ topic.
- Obtain a properties file for the IBM MQ topic that you want to change.
You can extract a properties file for an MQTopic using the extractConfigProperties command.
- Open the properties file in an editor and change the properties as needed.
Ensure that the environment variables in the properties file match your system.
- Run the applyConfigProperties command to change a IBM MQ topic configuration.
- If you no longer need a IBM MQ topic, you can delete the entire IBM MQ topic object.
To delete the entire object, specify DELETE=true in the header section of the
properties file and run the deleteConfigProperties command; for example:
AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
Results
You can use the properties file to configure and manage the IBM MQ topic object.
What to do next
Save the changes to your configuration.