The CONNECT command is used to open a connection to the enterprise messaging system.
The currently available vendor implementations are ActiveMQ, SonicMQ, Tibco Enterprise Messaging Service and WebSphereMQ.
It is possible to create more vendor implementations by writing a Java class that implements the JMSVendor interface.
The JMSFileService does a service properties lookup using the VENDOR keyword value to determine which Java class will be used to create the connection object.
vendor.sonicmq=com.acme.service.JMSVendorSonicMQ
vendor.tibcomq=com.acme.service.JMSVendorTibcoMQ
vendor.activemq=com.acme.service.JMSVendorActiveMQ
vendor.webspheremq=com.acme.service.JMSVendorMQSeries
Keyword values can also be passed to the CONNECT command by using a working list argument. The first column supplies the keyword name and the second column the keyword value.
The command keyword takes precedence over the working list keyword value entry.
Syntax:
Command | Keyword | Value | Developer notes |
|---|---|---|---|
CONNECT | VENDOR | Value | Required. Message System Vendor. |
HOST | value | Required. Hostname. | |
PORT | value | Optional. | |
USER | value | Optional. | |
PASSWORD | value | Optional. | |
CLIENTID | value | Optional. | |
QUEUE | value | Required. | |
REPLYTO | *TEMPORARY | Optional. Create and use a temporary reply queue. | |
CHANNEL | value | Conditional. Required for WebSphereMQ connection. | |
QUEUE-MANAGER | value | Optional. Used by WebSphereMQ connection. | |
CIPHER-SUITE | value | Optional. Used by WebSphereMQ connection. | |
MESSAGE-PRIORITY | value | 0 (lowest) to 9 (highest). | |
MESSAGE-DELIVERY | *PERSISTENT | Default. | |
*NONPERSISTENT | |||
MESSAGE-TIME-TO-LIVE | value | Default is 0 milliseconds. | |
SESSION-TRANSACTED | *YES | ||
*NO | Default. | ||
SESSION-ACKNOWLEDGE | *AUTO | Default. | |
*CLIENT | |||
*DUPOK |
Example
CONNECT VENDOR(WEBSPHEREMQ) HOST(LOCALHOST) CHANNEL(USERAGENT.CHANNEL) QUEUE-MANAGER(USERAGENT.QUEUE.MANAGER) QUEUE(USERAGENT.QUEUE) #WRKLIST(KEYWRD,KEYVAL)
CONNECT VENDOR(ACTIVEMQ) HOST(LOCALHOST) QUEUE(QUEUE_1) #WRKLIST(KEYWRD,KEYVAL)