Testing client connectivity
This topic explains how to test the client connectivity using MQ client for MQ-based integration between Sterling™ Order Management System and an external system.
- Create an Sterling Order Management System MQ queue. For example,
TESTQUEUE. For more information, see Adding queues. - Use test messages.
- Using the MQ client,
PUTa message toTESTQUEUE.On Linux or Unix:cd <MQ_Client_Installation_Path>/bin ./amqsputc TESTQUEUE OM_QMGR Sample AMQSPUT0 start Target queue is TESTQUEUE <type your message here> <enter> <enter> Sample AMQSPUT0 endOn Windows:cd <MQ_Client_Installation_Path>\bin amqsputc TESTQUEUE OM_QMGR Sample AMQSPUT0 start Target queue is TESTQUEUE <type your message here> <enter> <enter> Sample AMQSPUT0 endHere,
TESTQUEUEis the target queue andOM_QMGRis the Queue Manager to which the client connects. - View the queue depth, you will see that the queue depth increments with each PUT message. To view the queue depth, run the Manage Queue - displayQueue.
- Using the MQ client,
GETthe message fromTESTQUEUE.On Linux or Unix:cd <MQ_Client_Installation_Path>/bin ./amqsgetc TESTQUEUE OM_QMGR Sample AMQSGET0 start <the messages will be displayed here, one by one> <enter> <enter> Sample AMQSGET0 endOn Windows:cd <MQ_Client_Installation_Path>\bin amqsgetc TESTQUEUE OM_QMGR Sample AMQSGET0 start <the messages will be displayed here, one by one> <enter> <enter> Sample AMQSGET0 end - View the queue depth, you will see that the queue depth decreases with each GET message. To view the queue depth, run the Manage Queue - displayQueue self-serve process.
- Using the MQ client,
BROWSEthe messages inTESTQUEUE.On Linux or Unix:cd <MQ_Client_Installation_Path>/bin ./amqsbcgc TESTQUEUE OM_QMGR AMQSBCG0 - starts here ************* MQOPEN - 'TESTQUEUE' MQGET of message number 1, CompCode:0 Reason:0 ***Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 437 Format : 'MQSTR ' Priority : 0 Persistence : 0 MsgId : X'414D51204F4D5F514D4752202020202005638A5C0380C821' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'OM_QMGR ' ** Identity Context UserIdentifier : 'mqm ' AccountingToken : X'16010515000000D47E07095A7512291E76A0AD1A04000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : '<Installation_PATH>/bin/amqsbcgc.sh' PutDate : '20190319' PutTime : '14123179' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1' *** Message **** length - 17 of 17 bytes 0000000: 5465 7374 696E 6720 4D65 7373 6167 6520 'Testing Message ' 0000010: 32 '2 ' No more messages MQCLOSE MQDISCOn Windows:cd <MQ_Client_Installation_Path>\bin amqsbcgc TESTQUEUE OM_QMGR AMQSBCG0 - starts here ************* MQOPEN - 'TESTQUEUE' MQGET of message number 1, CompCode:0 Reason:0 ***Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 437 Format : 'MQSTR ' Priority : 0 Persistence : 0 MsgId : X'414D51204F4D5F514D4752202020202005638A5C0380C821' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'OM_QMGR ' ** Identity Context UserIdentifier : 'mqm ' AccountingToken : X'16010515000000D47E07095A7512291E76A0AD1A04000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : 'IST-WIN64\bin64\amqsputc.exe' PutDate : '20190319' PutTime : '14123179' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1' *** Message **** length - 17 of 17 bytes 0000000: 5465 7374 696E 6720 4D65 7373 6167 6520 'Testing Message ' 0000010: 32 '2 ' No more messages MQCLOSE MQDISC
If you are able to add, retrieve and browse the messages in the IBM Sterling® Order Management System queue, then the inbound flow is set up successfully.Note: This procedure is meant to test the inbound connection and not to consume the messages. If messages are consumed, then browsing the message does not show any result. - Using the MQ client,