Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

  • Establishing and maintaining sessions with MQ Series Server to communicate with Clients
  • Transmitting messages to its clients
  • Delivering messages from clients
  • Facilitating monitoring and administration

Image Added

Monitoring and Administration

...

Installation MQ Adaptor to FixEdge

Normally MQ adaptor is distributed as a zip-archive with the name MQAdaptor-xx.zip, where xx stands for MQ adaptor version. The distribution package consists of:

FileDescription

BIN\MQTAAddin-xx.dll or

BIN\MQTAAddin.so

MQ Transport Adaptor dynamic library for Windowsor MQ Transport Adaptor shared library for Linux
DOC\MQTA_InstallationGuide.pdfMQ Transport Adaptor - Installation Guide. This document
DOC\VersionHistory.txtMQ Transport Adaptor Version History
DOC\FIXEdge.propertiesSample FIX Edge configuration file.

To install MQ adaptor:

  • IBM MQ Client libraries must be installed on the FIX Edge machine where MQ Adaptor is ran. Third-party libraries are not incuded into TA package. They can be downloaded from  here.
  • Unpack the package and copy MQTAAddin-xx.dll/ MQTAAddin-xx.so  into the FIX Edge /bin folder. Configure adaptor according to the instructions below.
  • Restart FIX Edge.

...

Make sure that configuration of the adaptor correlates with the MQ Series Server parameters.

Property NameDefault ValueDescription
TransportLayer.MQAdaptor.DescriptionMQ Transport Adaptor DLLDescription of the transport adaptor
TransportLayer.MQAdaptor.DllNamebin/MQTAAddin.dllPath to the transport adaptor module
TransportLayer.MQAdaptor.TimeIntervalBeforeReconnect1000Time interval in milliseconds between reconnect attempts
TransportLayer.MQAdaptor.StorageDirectoryFixEdge1/logLogging directory for storage of outgoing messages. Required.
TransportLayer.MQAdaptor.BufferSizeForMessage65536Message buffer size. Max value is 4194304. 0 means a default value 64 * 1024
TransportLayer.MQAdaptor.MQ_HOSTNAMElocalhostMS Series Server host name
TransportLayer.MQAdaptor.MQ_PORT1414MS Series Server port
TransportLayer.MQAdaptor.MQ_MANAGER_NAMETestMQMS Series manager name
TransportLayer.MQAdaptor.MQ_CHANNEL_NAMETestConnectionMS Series Channel name
TransportLayer.MQAdaptor.MQ_CCSID437MS Series Server CCSID. The coded character set identifier to use with the WebSphere MQ queue
TransportLayer.MQAdaptor.SslKeyRepository/var/mqm/ssl/keyPath to SSL certificate storage file without extension (SCKR,MQSSLKEYR) e.g. /var/mqm/ssl/key or C:\\Program Files\\IBM\\WebSphere MQ\\ssl\\key
TransportLayer.MQAdaptor.SslCipherSpecificationTRIPLE_DES_SHA_USSSL CipherSpec name (SSLCIPH), required to use SSL, e.g. TRIPLE_DES_SHA_US
TransportLayer.MQAdaptor.SslClientAuthenticationfalseRemote peer authentication (SSLCAUTH)
TransportLayer.MQAdaptor.SslPeerNameCN=QMGR.*, OU=IBM, OU=WEBSPHERERemote peer DN filter(SSLPEER)
TransportLayer.MQAdaptor.WaitIntervalForGet1000Time interval in milliseconds to wait between polling message on MQ Series Server
TransportLayer.MQAdaptor.NumAttemptReconnect10Number of reconnect attempts to MQ Series Server
TransportLayer.MQAdaptor.SessionNumber1Number of sessions with MQ Series. Each session is a set of MQ Series queues.
TransportLayer.MQAdaptor.Session.1.ClientIDMQClientMQ session ID.
TransportLayer.MQAdaptor.Session.1.SmartXMLProcessortrueEnables mode of processing XML/FIXML messages:
  • For outgoing FIX XML message (MsgType = n) adaptor extracts XML data then sends data to MQ client.
  • For incoming XML/FIXML raw data adaptor wraps data into FIX XML message (MsgType = n) then routes message to FIX Edge.
TransportLayer.MQAdaptor.Session.1.ToClientQueueMQClient_toThe name for Queue, dedicated for message coming from client to MQ via FIX Edge
TransportLayer.MQAdaptor.Session.1.FromClientQueueMQClient_fromThe name for Queue, dedicated for message coming from MQ to client via FIX Edge
TransportLayer.MQAdaptor.Session.1.ErrorQueueMQClient_errorThe name for Queue dedicated for message, which cannot be handled because of error.
TransportLayer.MQAdaptor.Session.1.SenderID-Not required. SenderCompID (Tag = 49) in the received message is set to the property value.
TransportLayer.MQAdaptor.Session.1.TargetID-Not required. TargetCompID (Tag = 56) in the received message is set to the property value.
TransportLayer.MQAdaptor.Session.1.FromClientDropMessageFilter-Not required. Defines a regular expression (perl syntax) to drop matched messages coming from MQ.
TransportLayer.MQAdaptor.Session.1.SmartXMLProcessorFromClientMessageFilter-Not required. Defines a regular expression (perl
syntax) to apply SmartXMLProcessor to matched messages coming from MQ. Overrides default filter: case insensitive "<\?xml version.*|<FIXML.*"
syntax) to apply SmartXMLProcessor to matched messages coming from MQ. Overrides default filter: case insensitive "<\?xml version.*|<FIXML.*"

Error queue

An error queue is a local queue to which error messages can be sent by the WebSphere MQ connector when a message operation fails. For target queues, the error queue acts as a backup option for the target queue when messages cannot be written to the target queue

As per the solution diagram above, there are the following reasons for messages sent to the error queue:

  1. FIXEdge can't produce data to MQ. (e.g. due to there is no connection to MQ server.)
  2. FIXEdge can't consume data from MQ server.
  3. Other various MQ errors. (E.g. due to configuration issues, or message content issues)

FIXEdge can't produce data to MQ

Причин попадания сообщения в еррок кью разнообразны, для каждой необходим индивидуальный анализ логов.

Для обработки сообщений из очереди мы рекомендуем:

  • Use different Error Queues per session. Если сообщения из нескольких сессий кладутся в общую еррор кью это затрудняет траблшутинг. It would be easier to troubleshoot issues if the session would have own error queue.
    It can be configured with FIXEdge property:

    Code Block
    languageperl
    TransportLayer.MQAdaptor.Session.1.ErrorQueue = MQClient_error_1
    
    TransportLayer.MQAdaptor.Session.2.ErrorQueue = MQClient_error_2
  • Use dmpmqmsg tool for moving messages from the error queue to producer on. So all messages from the error queue should be replayed.

    Code Block
    languageperl
    dmpmqmsg -m MQClient -I MQClient_error -o MQClient_error_2 -s FIXEdge

    -m QueueManagerName
    -I Input queue name
    -o Output queue name
    -s Message content, as all messages have senderCompId and TargetCompId it can be used for filtering.

FIXEdge can't consume data from MQ server and other various MQ errors

These cases are rare ones if there were no configuration changes. 

Issues not causing messages in the error queue

There are cases that do not lead to the messages in Error queue.

E.g.: FIXEdge can't push the data to the FIX connection because the destination is down.

For troubleshooting, this case it's recommended to upgrade FIXEdge to version 6.9.0 with a Managed Queue feature.
It was designed for cases when messages should be pushed to the counterparty when they come back online and do not support recovery with resend requests.

Troubleshooting

The message is not sent to the client with multiple MQ TA configuration

The message is not delivered to MQ.

The following error appears in FixEdge.log when you use one MQ .dll for several adapters:

Code Block
titleFixEdge.log
ERROR   [MQQueueWriter]  <Thread_ID>  Removed message doesn't equal to sent message! Storage: 'MQTA_ID' Message removed from storage

Root cause

To different threads use shared resources from a single library MQ TA.  For example, it may happen if several transport adapters are configured wrong.

Solution

A user should get rid of usage one shared a library by several threads. There are 2 ways: 

  1. Use a single MQ TA library with several sessions 

    Code Block
    languageperl
    TransportLayer.TransportAdapters = TransportLayer.MQAdaptor
    
    TransportLayer.MQAdaptor.DllName = bin/MQTAAddin-vc10-MD-x64.dll
    #...
    TransportLayer.MQAdaptor.SessionNumber = 2
    
     TransportLayer.MQAdaptor.Session.1.ClientID = MQTA_ID_1
     TransportLayer.MQAdaptor.Session.1.ToClientQueue = MQClient_to_1
     TransportLayer.MQAdaptor.Session.1.FromClientQueue = 
     TransportLayer.MQAdaptor.Session.1.ErrorQueue = 
     TransportLayer.MQAdaptor.Session.1.ReceiveTransactionSize=10
     TransportLayer.MQAdaptor.Session.1.SendTransactionSize=10 
    
     TransportLayer.MQAdaptor.Session.2.ClientID = MQTA_ID_2
     TransportLayer.MQAdaptor.Session.2.ToClientQueue = MQClient_to_2
     TransportLayer.MQAdaptor.Session.2.FromClientQueue = 
     TransportLayer.MQAdaptor.Session.2.ErrorQueue = 
     TransportLayer.MQAdaptor.Session.2.ReceiveTransactionSize=10
     TransportLayer.MQAdaptor.Session.2.SendTransactionSize=10 
  2. Use several MQ TA with own library

    Code Block
    languageperl
    TransportAdapters = TransportLayer.MQAdaptor, TransportLayer.MQAdaptor2
    
    TransportLayer.MQAdaptor.DllName = bin/MQTAAddin-vc10-MD-x64.dll
    #...
    
    TransportLayer.MQAdaptor2.DllName = bin/MQTAAddin-vc10-MD-x64_2.dll
    #...

IBM MQ Error codes

The following error appears in FixEdge.log

Code Block
languageperl
ERROR   [MQQueuesReader]  1284  MQQueuesReader unable to create queue for client'trgQ'. Reason: Failed to set character set. Code:2538
ERROR   [MQQueuesReader]  244  MQQueuesReader unable to create queue for client'srcQ'. Reason: Failed to set character set. Code:2538
ERROR   [MQQueueWriter]  3368  MQTA failed to execute operation for client 'MQHub1': Failed to set character set. Code:2538

Solution

Please find the API Error codes on the official site.

WebSphere MQ Setup Guide

Getting MQ Soft

...

  1. Open MQExplorer on remote host
  2. Add Remote Queue Manager performing the following steps:

    1. Specify Queue Manager name
    2. Specify host and Server-connection channel

       


    3. Click Finish

QM should be accessible via remote MQ Explorer.

...

TransportLayer.MQAdaptor.SslKeyRepository = C:\\B2BITS\\FIXEdge\\FixEdge1\\conf\\key
TransportLayer.MQAdaptor.SslCipherSpecification = TRIPLE_DES_SHA_US
TransportLayer.MQAdaptor.SslClientAuthentication = false
TransportLayer.MQAdaptor.SslPeerName =

 

...


Troubleshooting

If MQ TA fails to initialize with record in log "Failed to set character set. Code: some code": make sure QueueManager on server side is running and you are trying to set right code character set.

...