MQ Inbound Connection

Overview

You can have multiple MQ Connections defined in the UAC.xml file. The only requirement is that you have the corresponding queues configured in your MQ Broker.

Setting Up and Inbound MQ Listener

To set up an inbound MQ Listener, you must:

  1. Supply values for the following items in the UAC.xml file:
    • Name
      Name of the connection which is user-defined. If you are going to define more than one MQ listener, the name for each MQ Connection must be unique.
    • Host
      Name or address of the server hosting the MQ Broker.
    • QueueManagerName
      Name of the MQ QueueManager.
    • Channel
      Name of the MQ Channel.
    • Port
      Port where the MQ Series Broker is listening (default is 1414).
  2. Specify the attributes for the MQ Listener, which include QueueName and Actions. Currently, the only Action that is supported is writing the inbound transaction to a file.
    • QueueName
      Queue on which to listen for inbound messages.
    • Directory
      Output directory where UAC will write the file. You must specify an absolute path to a directory associated with the relevant business process. This path should be valid and reachable either locally or via a network. The only requirement is that the directory must exist prior to commencing inbound operations.
    • File Name Pattern
      Name of the file and the sequence pattern (if there will be more than one file written to the same directory). The format is <filenamehere%Seq%.txt>, where filenamehere is the name of the file you have chosen. File name restrictions are enforced by the file system to which the file is being written. For example, using double quotation marks ( " ) around a file name in Windows will result in an error.
    • Start Sequence Number
      Starting number to use for the pattern sequence (%Seq%).
    • Write Properties
      Specification for whether or not the MQ message properties should be written to the file. The default value is false. However, if it is useful to see what was specified in the properties of the MQ message, set the value to true.

MQ Connection Sample

The following figure illustrates a sample MQ Connection section. The values highlighted in red are the values discussed above.

See UAC.xml File Description for details on the elements and structure of the UAC.xml file.


<sb:MQConnection>
      <sb:Name>MQ Series Listener</sb:Name>
      <sb:Host>Server Host or IP</sb:Host>
      <sb:QueueManagerName>MQ QueueManager</sb:QueueManagerName>
      <sb:Channel>MQ Channel</sb:Channel>
      <sb:Port>MQ Listening Port</sb:Port>
      <sb:Listeners>
         <sb:MQListener>
            <sb:QueueName>MQ Queue to Listen to</sb:QueueName>
            <sb:Actions>
               <sb:MQFileWriter>
                  <sb:Directory>Directory location to write file to</sb:Directory>
                  <sb:FilenamePattern>Filename pattern to write with %Seq% variable</sb:FilenamePattern>
                  <sb:StartSequenceNumber>0</sb:StartSequenceNumber>
                  <sb:WriteProperties>false</sb:WriteProperties>
               </sb:MQFileWriter>
            </sb:Actions>
         </sb:MQListener>
      </sb:Listeners>
   </sb:MQConnection>