Plataforma anterior

Testando a conectividade do cliente

Este tópico explica como testar a conectividade do cliente usando o cliente MQ para integração MQ entre o Sterling™ Order Management System e um sistema externo.

  1. Crie uma fila Sterling Order Management System MQ . Por exemplo, TESTQUEUE.. Para obter mais informações, consulte Incluindo filas.
  2. Use as mensagens de teste
    1. Usando o cliente MQ , PUT uma mensagem para TESTQUEUE.
      No Linux ou 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 end
      
      No 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 end
      

      Aqui, TESTQUEUE é a fila de destino e OM_QMGR é o Gerenciador de Filas ao qual o cliente se conecta

    2. Visualize a profundidade da fila, você verá que a profundidade da fila incrementa com cada mensagem PUT. Para visualizar a profundidade da fila, execute o Manage Queue- displayQueue
    3. Usando o cliente do MQ , GET a mensagem de TESTQUEUE
      No Linux ou 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 end
      
      No 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
      
    4. Visualize a profundidade da fila, você verá que a profundidade da fila diminui com cada mensagem GET Para visualizar a profundidade da fila, execute o processo de autoatendimento Manage Queue- displayQueue
    5. Usando o cliente do MQ , BROWSE as mensagens em TESTQUEUE
      No Linux ou 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
      MQDISC
      No 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
    Da mesma forma, também é possível procurar as mensagens na fila usando o processo de autoatendimento Gerenciar Fila- browseQueue .
    Se você puder adicionar, recuperar e navegar pelas mensagens na fila do sistema IBM Sterling® Order Management, então o fluxo de entrada foi configurado com sucesso.
    Nota: Este procedimento é destinado a testar a conexão de entrada e não consumir as mensagens. Se as mensagens forem consumidas, procurar a mensagem não mostrará nenhum resultado.