createWSNAdministeredSubscriber command
Use the createWSNAdministeredSubscriber command to create a new administered subscriber. An administered subscriber provides a mechanism for the WS-Notification service point to subscribe to an external notification producer at server startup time.
We can create a new WS-Notification administered subscriber by as described in this topic, or by using the administrative console as described in Create a new WS-Notification administered subscriber.
You should not define an administered subscriber for any of the endpoints exposed by the WS-Notification service on which it is being defined, because this would result in infinite looping of messages through the notification broker.
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 adds a new WS-Notification administered subscriber to the target WS-Notification service point.
Target Object
WSNServicePoint
Required parameters
- -endpoint
- The URL of the external web service to which the service should subscribe. That is, the endpoint reference (web address) of a notification producer or notification broker application. For example http://remoteproducer.com.
- -topic
- The topic on which the service should subscribe. This describes the class of notification messages that are delivered to the WS-Notification service point. For example stock/IBM. This property can include wildcards if they are supported by the topic dialect selected.
- -dialect
- The dialect in which the topic is expressed. That is, the name of the chosen topic dialect as defined by the WS-Topics standard. Values of this parameter are SIMPLE, CONCRETE, FULL. For more information, see WS-Topics.
Conditional parameters
None.
Optional parameters
- -topicNamespace
- The URI that describes the topic namespace in which the specified topic is defined. Omitting this field indicates that the topic is contained in the ad-hoc topic namespace.
- -remoteSubscriptionTimeout
- The length of time in hours after which the remote subscription will expire if not renewed by the server. This timeout minimizes the potential for orphaned subscriptions in the remote web service if the local server is uninstalled. Note that this field does not indicate the time at which the remote subscription is due to expire. Set the timeout length to something larger than the maximum length of time that the server is expected to remain offline, otherwise the stream of messages from the remote web service might be interrupted. While the server is running it occasionally renews the remote subscription termination time (with the specified timeout) to prevent it from expiring during normal operation. If not specified, this timeout defaults to 24 (hours).
Example
Create an administered subscriber on the WS-Notification service point newServicePoint created in the example from topic "Creating a new WS-Notification service point by ":
- Jython:
newAdminSub = AdminTask.createWSNAdministeredSubscriber(newServicePoint, ["-endpoint", "http://myremotehost:9080/producerEP", "-dialect", "SIMPLE", "-topic", "stock", "-topicNamespace", "http://example.org/mynamespace", "-remoteSubscriptionTimeout", 48] )
- Jacl:
set newAdminSub [ $AdminTask createWSNAdministeredSubscriber $newServicePoint { -endpoint http://myremotehost:9080/producerEP -dialect SIMPLE -topic stock -topicNamespace http://example.org/mynamespace -remoteSubscriptionTimeout 48 } ]
Related concepts
WS-Notification WS-Topics
Related tasks
Use WS-Notification for publish and subscribe messaging for web services Secure WS-Notification Create a new WS-Notification administered subscriber Modify a WS-Notification administered subscriber Listing active WS-Notification administered subscribers
WS-Notification troubleshooting tips WS-Topics Version 1.3 OASIS Standard
Related information:
Administered subscribers [Settings] Reference topic