The MQ Connector service is defined by the following data in the toolkit services definition file:
MQConnection tag attributes
id
Service name
QMgrName
Name of the queue manager. Mandatory.
AliasQMgrNameSend
Name of the queue manager on which the send queue is defined. This queue manager is different from QMgrName above.
deadLetterQ
Name of the deadletter queue. Optional.
sendToQ
Name of the send queue. Mandatory for static queues. If the MQ Connector is using dynamic queues to send messages, this tag must not have a value.
replyToQ
Name of the reply queue. Mandatory for static queues. If the MQ Connector is using dynamic queues to receive messages, this tag must not have a value.
putMessageOptions
Options that control the behavior of sendToQ. The default is MQPMO_NEW_MSG_ID|.
getMessageOptions
Options that control the behavior of replyToQ. The default is
MQGMO_WAIT|
MQGMO_FAIL_IF_QUIESCING|
MQGMO_COMPLETE_MSG.
sendToQOpenOptions
Options that control the opening of the send queue. The default is MQOO_OUTPUT.
replyToQOpenOptions
Options that control the opening of the reply queue. The default is MQOO_INPUT_AS_Q_DEF
persistence
Message persistence in the queue. Optional. The default is MQPER_PERSISTENCE_AS_Q_DEF
charSet
Character set relating to application message data. Optional. The default is MQCCSI_Q_MGR
messageType
Message type. Optional. The default is MQMT_DATAGRAM
messageOrCorrelation
Message search criteria. Following are the possible values:
message. The message ID in the reply message has to match the request messageId.
correlation. The correlation ID in the reply message has to match the request messageId. This is the default value.
encoding
Message numeric data representation. Optional. The default is MQENC_NATIVE
format
Format name employed by the sender to inform the receiver of the message format. Optional. The default is MQFMT_NONE
userId
Name of the message originator. Optional.
replyToQmgr
Name of the destination QueueManager for reply messages. Optional.
applicationName
Name of the application employed to send messages. Optional.
timeout
Timeout employed in the receive method. Optional.
serverOrClient
Whether the service is to work with Java Bindings or with Client for Java. Following are the possible values:
server (default)
client
synchronousMode
Whether the service is to work in synchronous mode. Following are the possible values:
enabled
disabled (default)
hostName
Name of the host with which the client is to connect when the service works as MQClient. This attribute is mandatory in this case.
channel
Name of the channel that the client is to use when the service works as MQClient. This attribute is mandatory in this case.
port
Port number for the client to use when the service works as MQClient. The default value is 1414. This attribute is mandatory if hostName or channel has not been specified.
expiry
How long WebSphere MQ retains (in tenths of a second) an unretrieved message before discarding it. The default value is MQC.MQEI_UNLIMITED.
automaticConnection
Establishment
Whether the connection is to be established automatically. Following are the possible values:
enabled
disabled (default)
sendModelQ
Name of the send model queue. Mandatory for dynamic queues.
sendDynamicQTemplate
Name of the dynamic send queue. This replaces the default name.
replyModelQ
Name of the reply model queue. Mandatory for dynamic queues.
replyDynamicQTemplate
Name of the dynamic send queue. This replaces the default name.
sendToQType
Whether a model queue is used to define the send queue. For dynamic queues, the value is "model"
replyToQType
Whether a model queue is used to define the reply queue. For dynamic queues, the value is "model"
Note The following parameter values can be specified with either an integer value or the corresponding constant defined in the com.ibm.mq.MQC interface:
▪ putMessageOptions
▪ getMessageOptions
▪ replyToQOpenOptions
▪ sendToQOpenOptions
▪ persistence
▪ charSet
▪ messageType
▪ encoding
The "format" parameter can be specified using a string value or its equivalent constant defined in the com.ibm.mq.MQC interface.
Examples
The following example defines a connection using static queues: