Skip to content

Troubleshoot MQ

This page provides troubleshooting guidance for the KX Sensors Message Queue (MQ).

Some information that could be useful when troubleshooting MQ.

Client registry (.mq.cr)

This table contains information about the queue clients. It is populated when a client registers with MQ.

Column Type Description
name Symbol Client name (supplied by client).
cn Symbol Connection name.
b Boolean 1b if session is active, 0b otherwise.

Once the client(s) have registered with MQ there should be an entry in this table indicating that the session is active. In the example below there are 10 different clients that have registered with MQ.

ohp[`kxsMQ_A1]".mq.cr"
name        cn                    b
-----------------------------------
kxsTASK_A7  @kxsMQ_A1.kxsTASK_A7  1
kxsTASK_A9  @kxsMQ_A1.kxsTASK_A9  1
kxsTASK_A4  @kxsMQ_A1.kxsTASK_A4  1
kxsTASK_A5  @kxsMQ_A1.kxsTASK_A5  1
kxsTASK_A2  @kxsMQ_A1.kxsTASK_A2  1
kxsTASK_A6  @kxsMQ_A1.kxsTASK_A6  1
kxsTASK_A10 @kxsMQ_A1.kxsTASK_A10 1
kxsTASK_A1  @kxsMQ_A1.kxsTASK_A1  1
kxsTASK_A8  @kxsMQ_A1.kxsTASK_A8  1
kxsTASK_A3  @kxsMQ_A1.kxsTASK_A3  1

Message buffer (.mq.mb)

This table contains messages that could be in-flight, pending or acknowledged but not yet removed from the buffer because of an earlier message that has not been acknowledged.

Column Type Description
id Long Message ID (equivalent to RT position in the input stream).
ets Timestamp Ack expire timestamp. Expiry is driven by packDurTO in mq.yaml. If the ack expires, the message is resent. 0Np indicates the message is pending. 0Wp indicates the message has been acknowledged.
apos Long RT position of ack message. 0Nj indicates the message has not been acknowledged.
c Long Client index selected to receive the message. This index points to a client in .mq.cr. -1 indicates the message has been acknowledged.
msg Any Message payload. () indicates the message has been acknowledged.

A build-up of unacknowledged messages would indicate there is a problem with sending messages to the client. During normal operation, messages should enter this buffer and be acknowledged instantly. Clean up of the buffer happens shortly after.

ohp[`kxsMQ_A1]"reverse .mq.mb"
id      ets                           apos    c  msg                    ..
------------------------------------------------------------------------..
5040389 2025.10.08D10:50:55.805478557         9  +`hdr`payload!(,`ac`rc`..
5040045 0W                            1412323 -1 ()                     ..
5039694 2025.10.08D10:50:55.804443883         7  +`hdr`payload!(,`ac`rc`..
5038516 0W                            1379563 -1 ()                     ..
5036706 2025.10.08D10:50:55.803309417         6  +`hdr`payload!(,`ac`rc`..
5036405 0W                            1368727 -1 ()                     ..
5035819 0W                            1458943 -1 ()                     ..
5035501 0W                            1296907 -1 ()                     ..
5035217 0W                            1411189 -1 ()                     ..
5034907 0W                            1463353 -1 ()                     ..
5034589 0W                            1310389 -1 ()                     ..
5034271 2025.10.08D10:50:55.798792725         6  +`hdr`payload!(,`ac`rc`..
5033986 0W                            1379311 -1 ()                     ..
5033694 0W                            1444201 -1 ()                     ..
5033342 2025.10.08D10:50:55.796506583         5  +`hdr`payload!(,`ac`rc`..

Next steps