createSIBJMSQueue command
Use the createSIBJMSQueue command to create a new JMS queue for the default messaging provider at a specific scope.
To run the command, use the AdminTask object of the wsadmin scripting client.
(iSeries) (iSeries) The wsadmin scripting client is run from Qshell. (iSeries) See Configure Qshell to run WebSphere scripts .
Command-line help is provided for service integration bus commands:
- For a list of the available service integration bus JMS commands in Jython and a brief description of each command, enter at the wsadmin prompt:
print AdminTask.help('SIBJMSAdminCommands')
- For overview help on a given command, enter 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()
The createSIBJMSQueue command creates a JMS queue for the default messaging provider at a specific scope.
Target object
The scope of the default messaging provider at which the JMS queue is to be created.
Required parameters
- -name
- The identifier by which this JMS queue is known for administrative purposes.
- -jndiName
- The JNDI name used to bind the queue into the application server namespace.
- -queueName
- The name of the service integration bus destination to which the JMS queue maps.
Optional parameters
- -description
- An optional description for the bus, for administrative purposes.
- -deliveryMode Application | NonPersistent | Persistent
- The delivery mode to be used by MessageProducers for messages sent to this queue.
- -timeToLive
- The default length of time from its dispatch time that a message sent to this queue should be retained by the system, where 0 indicates that time to live value does not expire. The value from the producer is used if the Time to Live parameter is not supplied.
- -priority
- The priority for messages sent to this queue. The value from the producer is used if not completed. In the range 0 to 9 where 0 is the lowest priority and 9 is the highest priority
- -readAhead AsConnection | AlwaysOn | AlwaysOff
- Used to control read-ahead optimization during message delivery. The default is AsConnection.
- -busName
- The name of the service integration bus that the service integration bus destination, identified by queueName, is configured on. If not set, the bus that the application is connected to is used.
- -scopeToLocalQP TRUE | FALSE
- Indicates whether the underlying service integration bus queue destination is scoped to a local queue point when addressed using this JMS queue. A local queue point is a queue point configured on the messaging engine to which the JMS application is connected. The option applies when using this JMS queue to send and receive messages and when setting a reply queue in a request message. When a reply queue is set in a request message, the local queue point is on the messaging engine to which the application setting the reply queue is connected, not the messaging engine to which the application that uses the reply queue sends the reply message. If the connected messaging engine does not have a queue point for the destination this option is ignored. The default is FALSE.
Change the default setting of this option is supported only when used by a JMS application running with a WebSphere Application Server v7.0 or later server or client, and that is connected to a messaging engine running on a WAS v7.0 or later server. Use on previous versions of WAS will result in an exception to the application.
- -producerBind TRUE | FALSE
- Indicates how JMS producers bind to queue points of the clustered queue. The default is FALSE.
Change the default setting of this option is supported only when used by a JMS application running with a WAS v7.0 or later server or client, and that is connected to a messaging engine running on a WAS v7.0 or later server. Use on previous versions of WAS will result in an exception to the application.
- TRUE
- The messaging system selects a queue point when the session is opened. All messages produced by the session are sent to the chosen queue point. The messaging system uses the producerPreferLocal setting when selecting the queue point.
- FALSE
- The messaging system selects a queue point each time a message is sent, potentially workload balancing the messages across all available queue points. The messaging system uses the producerPreferLocal setting when selecting the queue point.
- -producerPreferLocal TRUE | FALSE
- Indicates whether a queue point local to the producer is preferred to other available queue points when the messaging system selects a queue point to produce messages to. A local queue point is a queue point configured on the messaging engine to which the JMS application is connected. The default is TRUE.
Change the default setting of this option is supported only when used by a JMS application running with a WAS v7.0 or later server or client, and that is connected to a messaging engine running on a WAS v7.0 or later server. Use on previous versions of WAS will result in an exception to the application.
- -consumerGatherMessages TRUE | FALSE
- A JMS consumer or browser is attached to a single queue point of the service integration bus destination by the messaging system. This parameter indicates whether a JMS consumer or browser take messages from any available queue points of the service integration bus destination (TRUE), or the single queue point to which it is attached (FALSE). The default is FALSE. Gathering messages from multiple queue points results in an increased performance cost and message order cannot be maintained.
Change the default setting of this option is supported only when used by a JMS application running with a WAS v7.0 or later server or client, and that is connected to a messaging engine running on a WAS v7.0 or later server. Use on previous versions of WAS will result in an exception to the application.
Examples
In the following examples, code blocks beginning with wsadmin> show code that is entered by the user. Lines that do not begin with wsadmin> show code that has been returned by the console.
- Use Jython:
wsadmin>AdminConfig.getid("/Node:9994GKCNode01" )'9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)'wsadmin>AdminTask.createSIBJMSQueue("WASINSTALL2Node01(cells/WASINSTALL2Cell01/ nodes/WASINSTALL2Node01|node.xml#Node_1)", ["-name", "jmsq2", "-jndiName", "jms/jnmsq2", "-queueName", "busq4jmsq2"])'jmsq2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml #J2CAdminObject_1098737234986)'wsadmin>AdminTask.listSIBJMSQueues("WASINSTALL2Node01(cells/WASINSTALL2Cell01 /nodes/WASINSTALL2Node01|node.xml#Node_1)")'queue1(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CAdminObject_1098711838691) jmsq2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CAdminObject_1098737234986)'- Use Jacl:
wsadmin>$AdminConfig getid /Node:9994GKCNode019994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)wsadmin>$AdminTask createSIBJMSQueue 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name jmsq2 -jndiName jms/jnmsq2 -queueName busq4jmsq2}jmsq2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CAdminObject_1098737234986)wsadmin>$AdminTask listSIBJMSQueues 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)queue1(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CAdminObject_1098711838691) jmsq2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CAdminObject_1098737234986)
The following example shows how to create a default messaging provider JMS queue that selects a queue point when a session is opened and never changes:
- Use Jython:
wsadmin>AdminTask.createSIBJMSQueue("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1)", ["-name", "MyJMSQueue", "-jndiName", "MyJMSQueue", "-busName bus1", "-queueName", "MyExistingQueue", "-deliveryMode", "Application", "-readAhead", "AsConnection", "-producerBind", "TRUE"])- Use Jacl:
wsadmin>$AdminTask createSIBJMSQueue 9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1 {-name MyJMSQueue -jndiName MyJMSQueue -busName bus1 -queueName MyExistingQueue -deliveryMode Application -readAhead AsConnection -producerBind TRUE }
The following example shows how to create a default messaging provider JMS queue that selects a queue point every time a message is sent. There is no preference over which queue point is selected and the consumers take messages from any queue point:
- Use Jython:
wsadmin>AdminTask.createSIBJMSQueue("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1)", ["-name", "MyJMSQueue", "-jndiName", "MyJMSQueue", "-busName bus1", "-queueName", "MyExistingQueue", "-deliveryMode", "Application", "-readAhead", "AsConnection", "-producerBind", "FALSE", "-producerPreferLocal", "FALSE", "-gatherMessages", "TRUE"])- Use Jacl:
wsadmin>$AdminTask createSIBJMSQueue 9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1 {-name MyJMSQueue -jndiName MyJMSQueue -busName bus1 -queueName MyExistingQueue -deliveryMode Application -readAhead AsConnection -producerBind FALSE -producerPreferLocal FALSE -gatherMessages TRUE}
The following example shows how to create a default messaging provider JMS queue that scopes all operations on it down to the queue point local to the user of the JMS queue:
- Use Jython:
wsadmin>AdminTask.createSIBJMSQueue("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1)", ["-name", "MyJMSQueue", "-jndiName", "MyJMSQueue", "-busName bus1", "-queueName", "MyExistingQueue", "-deliveryMode", "Application", "-readAhead", "AsConnection", "-scopeToLocalQP", "TRUE"])- Use Jacl:
wsadmin>$AdminTask createSIBJMSQueue 9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1 {-name MyJMSQueue -jndiName MyJMSQueue -busName bus1 -queueName MyExistingQueue -deliveryMode Application -readAhead AsConnection -scopeToLocalQP TRUE}