createWSNAdministeredSubscriber command
Use the createWSNAdministeredSubscriber command to create a new administered subscriber.
You can create a new WS-Notification administered subscriber by using the wsadmin tool as described in this topic, or by using the administrative console as described in Creating a new WS-Notification administered subscriber.
您不應該針對定義了受管理訂閱者的 WS-Notification 服務所顯現的任何端點來定義受管理訂閱者,因為這會使通過通知分配管理系統的訊息陷入無限迴圈。
如果要執行這個指令,請使用 wsadmin Scripting 用戶端的 AdminTask 物件。
wsadmin Scripting 用戶端是從 Qshell 執行.
如需相關資訊,請參閱利用 wsadmin Script 配置 Qshell 來執行 WebSphere Script.
- 如需可用的 WS-Notification 指令清單,以及每個指令的簡要說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('WSNotificationCommands')
- 如需給定指令的概觀說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('command_name')
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
- 換言之,就是通知生產端或通知分配管理系統應用程式的端點參照(網址)。例如 http://remoteproducer.com。
- -topic
- 這說明遞送到 WS-Notification 服務點之通知訊息的類別。 例如,stock/IBM。這個內容可包含萬用字元(如果您所選主題用語有支援的話)。
- -dialect
- 換言之,依照 WS-Topics 標準所定義,就是所選主題用語的名稱. 這個參數的值如下:SIMPLE、CONCRETE、FULL。 For more information, see WS-Topics.
Conditional parameters
None.
Optional parameters
- -topicNamespace
- Omitting this field indicates that the topic is contained in the ad-hoc topic namespace.
- -remoteSubscriptionTimeout
- 這個逾時值,可以在本端伺服器解除安裝時,將遠端 Web 服務中留下孤立訂閱的可能性減到最低。請注意,這個欄位不會指出遠端訂閱預定到期的時間。 請將逾時長度設為超出預計伺服器會保持離線的最長時間,否則,有可能岔斷來自遠端 Web 服務的訊息串流。當伺服器在執行中,它有時會更新遠端訂閱的終止時間(以指定的逾時值),以防止在正常作業期間到期。 如果沒有指定,這個逾時值預設為 24(小時)。
Example
- Using Jython:
newAdminSub = AdminTask.createWSNAdministeredSubscriber(newServicePoint, ["-endpoint", "http://myremotehost:9080/producerEP", "-dialect", "SIMPLE", "-topic", "stock", "-topicNamespace", "http://example.org/mynamespace", "-remoteSubscriptionTimeout", 48] )
- Using Jacl:
set newAdminSub [ $AdminTask createWSNAdministeredSubscriber $newServicePoint { -endpoint http://myremotehost:9080/producerEP -dialect SIMPLE -topic stock -topicNamespace http://example.org/mynamespace -remoteSubscriptionTimeout 48 } ]