MQ Series adapter
Two adapters for IBM MQ. The Listener gets messages from a queue and publishes them to the bus; the Caller puts messages on a queue. The Authentication holds the queue manager, the channel and TLS.
IBM MQ is the longest-running enterprise message broker in production. iQBus reaches it with two adapters that share one connection model: the MQ Series Listener goes on a receive port and the MQ Series Caller on a send port. Neither holds a host or a credential. That belongs to the Authentication, so pointing a port at another queue manager is a change of Authentication and nothing else.
Both adapters use the MQ Series Connection Definition, but an Authentication is made for one adapter: one created for the MQ Series Listener cannot be picked on a Caller, and the other way round. A Listener and a Caller on the same queue manager therefore each have their own Authentication with the same connection values.
| Field | Default | What it does |
|---|---|---|
| Connection Name | Required | The queue manager's listener as host(port), for example mqhost.example.com(1414). |
| Queue Manager | Required | The queue manager name, for example QMGR1. |
| Channel | Required | A server-connection channel, for example APP.SVRCONN. Create one for iQBus rather than using the default channels. |
| User Name | Empty | The MQ user. It needs the permissions listed below and must not be an administrator or a member of mqm. |
| Password | Empty | The MQ user's password. |
| Use TLS | Off | Turn it on to show the TLS fields below. |
| Reconnect | QueueManager | QueueManager reconnects to the same queue manager after a dropped connection or a restart. Disabled does not. |
| Field | Default | What it does |
|---|---|---|
| Cipher Spec | TLS_RSA_WITH_AES_128_CBC_SHA256 | Must match the channel's CipherSpec (SSLCIPH). The list: TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, ECDHE_RSA_AES_128_GCM_SHA256, ECDHE_RSA_AES_256_GCM_SHA384, TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384. |
| Peer Name | Empty | The distinguished name the queue manager's certificate must carry, for example CN=QMGR1. iQBus checks it before anything is sent, and a mismatch refuses the connection. Empty skips the check. |
| Trusted CA Certificates | Empty | The PEM certificate of the CA that signed the queue manager's certificate, or the queue manager's own certificate when it is self-signed. Paste it with its line breaks. |
| Client Certificate (PKCS#12, base64) | Empty | For mutual TLS only: the client certificate and its private key as a PKCS#12 file, Base64 encoded. |
| Client Certificate Password | Empty | The password of that PKCS#12 file. |
One-way TLS needs Use TLS, the channel's Cipher Spec and Trusted CA Certificates. Mutual TLS, for a channel with SSLCAUTH(REQUIRED), adds the client certificate and its password; the queue manager's key repository must trust that certificate.
Auth Config Type is Static on the Listener and Static or Dynamic on the Caller. A receive port has no message to resolve a credential from, so every receive adapter offers Static alone. With Dynamic, the Caller resolves the Authentication name per message from the Auth Resolution Key binding, so one port can put to several queue managers.
Give the MQ user only what its ports use. This is the confirmed minimum; anything less is refused by the queue manager with reason 2035.
| MQ object | Listener | Caller | Notes |
|---|---|---|---|
| Queue manager | connect, inq | connect | The Listener is refused without inq. |
| The Listener's queue | get, inq | ||
| The Caller's queue | put | ||
| Backout Queue | put | When On Failure is Backout. | |
| Transmission queue | put | Only with Remote Queue Manager. MQ checks the transmission queue object, which is often named after the remote queue manager. | |
| Browse button | dsp on the queue manager; get, inq on SYSTEM.DEFAULT.MODEL.QUEUE; put, inq on SYSTEM.ADMIN.COMMAND.QUEUE | Only to list queues in the port dialog. | |
The setmqaut commands, for a queue manager on Windows
Queue manager QMGR1, MQ user iqbusapp. Replace the names with yours and leave out the lines for features you do not use.
setmqaut -m QMGR1 -t qmgr -p iqbusapp +connect +inq +dsp setmqaut -m QMGR1 -n APP.IN.ORDERS -t q -p iqbusapp +get +inq setmqaut -m QMGR1 -n APP.OUT.ORDERS -t q -p iqbusapp +put setmqaut -m QMGR1 -n APP.BACKOUT -t q -p iqbusapp +put setmqaut -m QMGR1 -n SYSTEM.DEFAULT.MODEL.QUEUE -t q -p iqbusapp +get +inq setmqaut -m QMGR1 -n SYSTEM.ADMIN.COMMAND.QUEUE -t q -p iqbusapp +put +inq setmqaut -m QMGR1 -n QMGR2 -t q -p iqbusapp +put
The last line is for a Caller that puts to the remote queue manager QMGR2 through a transmission queue of the same name.
The Listener keeps its connections open, gets each message from the queue and publishes it to the bus as one message. It is one-way: nothing is sent back to MQ.
| Field | Default | What it does |
|---|---|---|
| Auth Config Type | Static | The only option on a receive port. |
| Auth Config | Required | An MQ Series Connection Authentication made for the MQ Series Listener. |
| Queue Name | Required | The queue to read. The Browse button lists the queues the MQ user can see. |
| Wait Interval (sec) | 30 | How long one get waits on an empty queue before the next one starts. |
| Ordered | Off | On: one consumer opens the queue exclusively and reads it in queue order. The messages still travel the bus and the send ports independently, so the order downstream is not guaranteed. |
| Consumers | Empty | How many connections read the queue at the same time. |
| On Failure | Backout | What happens to a message the Listener cannot hand to iQBus, for example one larger than Max Message Size: Backout, DeadLetter or Complete. Backout moves it intact to the Backout Queue; Complete removes it and discards it. Either way the messages behind it keep flowing. |
| Backout Queue | Empty | Where Backout moves the message. The MQ user needs put on it. |
| CCSID Override | Empty | Empty: the code page comes from each message's header. A CCSID here makes the queue manager convert every message to that code page on the get, and a character the code page does not have is replaced. |
| Max Message Size (KB) | 10240 | A larger message goes to On Failure instead of the bus. |
The port's Adapter Message Type decides how the body reaches the bus. With a type of the BIN format, the message is stored exactly as it was received, whatever its content, and a Tracking download returns the original bytes. With any other format the body is read as text in the code page of the message header (or CCSID Override), so 1252, 437 and EBCDIC 37 all arrive as correct text. Content that is not valid text under a text type is published as its Base64 string; use a BIN type for files.
The values of the MQ message header are available to subscriptions and Variable assignments under {{Config.MQSeriesListener.*}}; the expression editor lists them as you type.
The Caller puts each message that reaches its send port on one queue. Two-way does not read a reply: after a successful put the Caller publishes the message back to the bus, with its original body and the port's Adapter Message Type, so the flow can continue after the put. Reply To Queue and Reply To Queue Manager are only written into the MQ message for the application that receives it.
| Field | Default | What it does |
|---|---|---|
| Auth Config Type | Static | Static picks one Authentication. Dynamic resolves it per message from the Auth Resolution Key binding. |
| Auth Config | Required | An MQ Series Connection Authentication made for the MQ Series Caller. |
| Queue Name | Required | The queue to put to. With Remote Queue Manager, the queue's name on that queue manager. |
| Remote Queue Manager | Empty | Another queue manager to deliver to through the connected one. The put goes to the transmission queue, so the MQ user needs put on it. |
| Persistence | AsQueueDefault | AsQueueDefault, Persistent or NotPersistent. |
| Priority | Empty | 0 to 9. |
| Expiry (sec) | Required | How long the message may wait on the queue, in seconds. |
| Format | String | String marks the body as text. None marks it as binary; use it for BIN messages. |
| Character Set (CCSID) | 1208 | The code page the text is written in; 1208 is UTF-8, and 1252 and EBCDIC 37 work too. The value is yours to get right: iQBus does not check it, so use a CCSID the queue manager supports, or every send fails. A character the code page cannot represent fails that send. |
| Message ID | Empty | See the identifier rules below. |
| Message ID Format | Hex | Hex or Text. |
| Correlation ID | Empty | See the identifier rules below. |
| Correlation ID Format | Hex | Hex or Text. |
| Reply To Queue | Empty | Written into the message for the receiving application. The Caller does not read it. |
| Reply To Queue Manager | Empty | The same, for the reply queue's queue manager. |
| User Properties | Empty | Key and value rows, written as MQ message properties. How a receiving application sees them depends on the queue's PROPCTL setting. |
| Format | What you enter | What MQ receives |
|---|---|---|
| Hex | An even number of hex digits, up to 48 | Those bytes, padded with zeros to 24 bytes |
| Text | Up to 24 bytes of UTF-8 text | Those bytes, padded with zeros to 24 bytes |
| Field empty | Nothing | Message ID: generated by MQ. Correlation ID: all zeros. |
Message size. Bodies of 4,000,000 bytes go through. User Properties count against the queue's maximum message length (MAXMSGL), so with properties keep the body a little under it; a body of exactly MAXMSGL fails with reason 2010.
After the put. Tracking shows MQSeriesCaller.MessageId, the Message ID as hex, and MQSeriesCaller.QueueName, so a message can be matched to the one on the MQ side.
| What happens | What iQBus does |
|---|---|
| The Listener's login is rejected (reason 2035), or its TLS configuration is wrong (reason 2402) | One attempt, then the port stops and the notification bell names the reason. No repeated logins, so the MQ account is not locked out. Fix the port or its Authentication and start the port again. Listener failures do not raise Activity Notifications. |
| The queue manager restarts or drops the connection | With Reconnect set to QueueManager, both adapters reconnect by themselves and carry on. |
| A Caller put fails | The port's Retry Count and Interval apply first; then the message is suspended in Tracking. The reason is in Tracking: under All, expand the run and open the step just before the Suspended step (210), usually the adapter call (100). Its Error tab shows the MQ reason, for example MQ reason 2398 (MQRC_SSL_PEER_NAME_MISMATCH). |
That is the MQ Series adapter
A Listener that gets from one queue, a Caller that puts to one, and an Authentication per adapter that holds the queue manager, the channel and TLS. Back to Adapters.