Create Queue
Creates a queue's supporting client on the Broker.
Syntax
create { queue | queues } for { ( lookup-name ) + | * }
[ using qcf-name
with user=userName authenticator=authenticator ]
create { queue | queues } ( queue-names )+ with
[ group=client-group-name ]
[ application=application-name ]
[ { sharedState | ss }={ true | false } ]
[ { sharedStateOrdering | sso }={ none | publisher } ]
[ priorityOrdering={ true | false } ]
[ user=userName ]
[ authenticator=authenticator ]
The command syntax has two forms; following are the parts for both forms:
Part | Description |
queueorqueues | Required.The name used to look up this queue in the JNDI directory. |
qcf-name | Optional.The connection factory name found in JNDI, which can either be a ConnectionFactory or QueueConnectionFactory. |
user | Optional.If the queue is going to be accessed from a connection using basic authentication, specify the basic authentication user. If the queue is going to be accessed from a connection using SSL, specify the distinguished name of the user. |
authenticator | Optional. If the queue 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 queue 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. |
queue-names | Required. The queue names that you want to create. |
group | Optional.The name of an existing client group or a new client group. If you enter a new client group name, that client group is created. The default client-group-name is JMSClient. |
application | Optional. The name of the client application on which to create the queue. |
priorityOrdering | Optional.Whether or not the queue orders messages by priority. The default value is true. |
sharedState | Optional. Whether to allow multiple queue receivers to concurrently read from the queue. The default value is false. |
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. |
Remarks
You must establish a connection to the Broker before using this command.
The first form of the command creates the clients for queues bound into JNDI as lookup-name. You can specify the lookup name using an absolute or relative path.
You can specify an asterisk ( * ) for lookup-name to create supporting Broker clients for all queue objects in the current JNDI context. When you use an asterisk for lookup-name, you must be in the context of the queues you want to create. You cannot use an asterisk with a relative or absolute path to a context.
If a queue receiver will access the queue through SSL, you must specify the lookup name of the connection factory that the receiver will use to retrieve messages from the queue. You must also supply the distinguished name that the receiver will supply when it connects to the Broker through this connection factory. In addition, you must specify the distinguished name of the issuer of the certificate.
If you specify the lookup names of multiple queues, the SSL credentials in the specified connection factory will be applied to all queues.
The second form of the command creates the Broker client without using JNDI.
Note:
The create queue commands that use the sslDn and issuerDn parameters of the previous Broker versions will continue to work. The user parameter replaced the sslDn parameter, and the authenticator parameter replaced the issuerDn parameter.
Example
The following command sequence connects to the Broker and then navigates to the TestEnvironment context. Using the bind command, it creates the queue object, EmployeeQueue, and then binds it to JNDI under the lookup name EmpQ. As a last step, the command sequence uses the create queue command to create the queue's supporting client on the Broker.
> connect broker "Test JMS Broker" server testserver
> cd TestEnvironment
> bind queue EmpQ with queueName=EmployeeQueue
> create queue for EmpQ
Related Commands