You can use scripting to configure a new topic for the WebSphere® MQ
messaging provider.
Before you begin
You can also use the
createWMQTopic command to
create a queue for the WebSphere MQ messaging provider.
Before starting
this task, the wsadmin tool must be running.
About this task
Complete the following steps to configure a new topic for the WebSphere MQ
messaging provider:
Procedure
- Identify the parent ID:
Example output:
JMSP1(cells/mycell/nodes/mynode|resources.xml#JMSProvider_1)
- Get the required attributes:
Example output:
Attribute Type name String jndiName String baseTopicName
String
- Set up the required attributes:
Using Jacl:
set name [list name MQT] set jndi [list jndiName jms/MQT] set baseTN [list baseTopicName "Put the
base topic name here"] set mqtAttrs [list $name $jndi $baseTN]
Example
output:
{name MQT} {jndiName jms/MQT} {baseTopicName {Put the base topic name here}}
Using Jython:
name = ['name', 'MQT'] jndi = ['jndiName', 'jms/MQT'] baseTN = ['baseTopicName', "Put the base
topic name here"] mqtAttrs = [name, jndi, baseTN] print mqtAttrs
Example
output:
[[name, MQT], [jndiName, jms/MQT], [baseTopicName, "Put the base topic name here"]]
- Create a topic for the WebSphere MQ messaging provider:
Example output:
MQT(cells/mycell/nodes/mynode|resources.xml#MQTopic_1)
- Save the configuration changes.
- In
a network deployment environment only, synchronize the node.
Example
AdminTask.createWMQTopic('DRAPERDCell01(cells/DRAPERDCell01|cell.xml)', '[-name MQQueue
-jndiName jms/MQQueue -topicName TopicName -qmgr QueueManager -description ]')