Broker 10.5 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | webMethods Messaging Administration | JMSAdmin Command Reference | JMSAdmin Command Descriptions | Create Durable Subscriber
 
Create Durable Subscriber
Creates a durable subscriber on a Broker.
Syntax
create durable subscriber subscriber-name
for topicName using tcf-name
 
[ with [ nolocal ] [ selector=selector-string ]
[ user=userName authenticator=authenticator ] ]
 
create durable subscriber subscriberName
topic topicName client-id client-id
 
[ with [ nolocal ] [ selector=selectorString ]
[ group=client-group-name ]
[ application=application-name ]
[ sharedState ={ true | false } ]
[ sharedStateOrdering ={ none | publisher } ]
[ user=userName ]
[ authenticator=authenticator ]
[ localOnly={ true | false } ]
[ deadLetterOnly={
true | false }
]
[ priorityOrdering={ true | false } ]
The command syntax has these parts:
Part
Description
subscriber-name
Required. The unique name of the durable subscriber.
This name must match the name that the JMS client will specify in the name parameter when it calls the session.createDurableSubscriber() method.
topicName
Required. The name of the topic to which the durable subscriber will subscribe.
tcf-name
Required (for the first version of the command). The connection factory name found in JNDI (which can be a ConnectionFactory or TopicConnectionFactory). The factory name that you specify must have a client ID setting.
client-id
Required (for the second version of the command). The durable subscriber that is created uses the supplied client-id as part of the Broker client ID that is created.
nolocal
Optional. Suppresses the delivery of messages that are published by the durable subscriber's own connection.
Include this option if the JMS client will enable the nolocal attribute when it calls the session.createDurableSubscriber() method.
selector
Optional. A message selector string. Use if the JMS client includes a message selector string when it calls the session.createDurableSubscriber() method.
user
Optional. If the subscription is going to be accessed from a connection using basic authentication, specify the basic authentication user.
If the subscription is going to be accessed from a connection using SSL, specify the distinguished name of the user.
authenticator
Optional. If the subscription is going to be accessed from a connection using basic authentication, specify the basic authentication alias (authenticator source). This value can be found in the basicauth.cfg file.
If the subscription is going to be accessed from a connection using SSL, specify the distinguished name of the certificate issuer. This value can usually be found in the certificate file.
group
Optional. The name of an existing client group for this subscriber. The default client-group-name is JMSClient.
application
Optional. The name of the application stored as part of the application's Broker client state. The application is displayed by JMSAdmin.
sharedState
Optional. Whether to allow multiple durable subscribers to share the same queue of messages. The default value is false.
If sharedState is set to true, webMethods Broker used as a JMS provider creates Broker clients as shared state clients for the connection.
sharedStateOrdering
Optional. The ordering of documents received on a shared state client. The default value is none.
*To receive documents in order from a publisher, set to publisher.
*To receive documents in any order, set to none.
priorityOrdering
Optional.Whether or not the queue orders messages by priority. The default value is true.
localOnly
Optional. If you set this option to true, only messages originating (published) from the local machine will be received. The default value is false.
deadLetterOnly
Optional. If you set this option to true, only dead letter subscriptions will be received. The default value is false.
Remarks
You must establish a connection to the Broker before using this command.
If the subscriber is going to be accessed from a Connection or TopicConnection using SSL, the distinguished name that the subscriber will provide when it establishes a connection must be supplied. In addition, the distinguished name of the issuer of the certificate must be supplied.
You must also provide the actual name of the topic to which the durable subscriber subscribes and the lookup name of the connection factory that creates the connection through which the durable subscriber connects.
The second form of the command creates a durable subscriber without using JNDI.
Note:
The create durable subscriber commands that use the sslDn and issuerDn parameters of the previous Broker versions will continue to work. Use the user parameter instead of sslDn, and the authenticator parameter instead of issuerDn.
Example
Connect to a durable subscriber named MySub, which will receive selected messages from topic Test::Topic1 through connection factory MyTCF.
> connect broker "Test JMS Broker" server testserver
> create durable subscriber MySub for Test::Topic1 using MyTCF –
with selector = "city='Sunnyvale'"
Related Commands
Delete Durable Subscriber