createWSNTopicNamespace command
Use the createWSNTopicNamespace command to create a new WS-Notification permanent topic namespace. A topic namespace is a grouping of topics that allows information to be shared between applications. You use a permanent topic namespace to statically define the association between a WS-Notification topic namespace URI and a service integration bus topic space destination.
We can create a new WS-Notification permanent topic namespace by as described in this topic, or by using the administrative console as described in Create a new WS-Notification permanent topic namespace.
We can create many to many relationships between the set of permanent topic namespaces defined in a cell (that is for all WS-Notification services defined in that cell) and the service integration bus topic spaces with which they are associated. These relationships can become quite complex depending upon the topologies required by the applications that connect to the WS-Notification service. For guidance on when certain configurations might or might not be appropriate, see Options for associating a permanent topic namespace with a bus topic space.
To run the command, use the AdminTask object of the wsadmin scripting client.
The wsadmin scripting client is run from Qshell. For more information, see Configure Qshell to run WebSphere scripts .
Command-line help is provided for service integration bus commands:
- For a list of the available WS-Notification commands, plus a brief description of each command, enter the following command at the wsadmin prompt:
print AdminTask.help('WSNotificationCommands')
- 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 the changes to the master configuration using the following command:
AdminConfig.save()
Purpose
This command creates the following resources:
- It creates a new WS-Notification topic namespace on a WS-Notification service and associates it with the specified service integration bus topic space.
- It creates the specified service integration bus topic space if it does not already exist.
We can also set a configuration attribute of a permanent topic namespace to control the reliability setting (persistence or non persistence) that is applied to any messages that use a given topic namespace.
Target Object
WSNService
Required parameters
- -namespace
- The URI string by which this topic namespace is known. That is, the namespace URI by which WS-Notification applications refer to topics hosted by this namespace. For example http://widgetproducer.com/prices.
- -busTopicSpace
- The service integration bus topic space with which this namespace is associated. That is, the bus topic space used by this topic namespace.
Conditional parameters
None.
Optional parameters
- -reliability
- The service integration bus reliability to apply to messages published to this topic namespace. Valid values for this property are as follows:
- BEST_EFFORT_NONPERSISTENT
- EXPRESS_NONPERSISTENT
- RELIABLE_NONPERSISTENT
- RELIABLE_PERSISTENT
- ASSURED_PERSISTENT
Each value represents one of the service integration bus message reliability levels.
Examples
In the following examples, the WS-Notification topic namespace uses the WS-Notification service newService created in the example from topic "Creating a new WS-Notification service by ".
Create a WS-Notification topic namespace on the WS-Notification service newService:
- Jython:
newTopicNamespace = AdminTask.createWSNTopicNamespace(newService, ["-namespace", "http://example.org/topicNamespace/example1", "-busTopicSpace", "mySIBTopicspace"] )
- Jacl:
set newTopicNamespace [ $AdminTask createWSNTopicNamespace $newService { -namespace http://example.org/topicNamespace/example1 -busTopicSpace mySIBTopicspace } ]
Create a WS-Notification topic namespace on the WS-Notification service newService with a specific reliability:
- Jython:
newTopicNamespace = AdminTask.createWSNTopicNamespace(newService, ["-namespace", "http://example.org/topicNamespace/example1", "-busTopicSpace", "mySIBTopicspace", "-reliability", "EXPRESS_NONPERSISTENT"] )
- Jacl:
set newTopicNamespace [ $AdminTask createWSNTopicNamespace $newService { -namespace http://example.org/topicNamespace/example1 -busTopicSpace mySIBTopicspace -reliability EXPRESS_NONPERSISTENT} ]
Related concepts
WS-Notification Options for associating a permanent topic namespace with a bus topic space
Related tasks
Use WS-Notification for publish and subscribe messaging for web services Secure WS-Notification Create a new WS-Notification permanent topic namespace
WS-Notification troubleshooting tips
Related information:
Permanent topic namespace [Settings] Reference topic