MQ

 View Only
  • 1.  missing pubsub properties

    IBM Champion
    Posted Thu February 03, 2022 10:18 AM
    The documentation says that I should get many message properties when I get a publication message.  For example
    MQTopicString, MQSubUserData, MQPubOptions. MQPubLevel, MQPubTime,

    I get the first two, topicstring and subuserdata, but no others.

    What do I need to do to get the other properties, is there a magic option I need to set?     They look like they have been there for a few releases.
    I am on z/OS.
    Thank you

    Colin

    ------------------------------
    Colin Paice
    ------------------------------


  • 2.  RE: missing pubsub properties

    Posted Thu March 03, 2022 06:00 AM
    Hi Colin

    I can't think why that would be off the top of my head, but precise handling of message properties is very dependent on all sorts of factors. 

    Could you give a bit more info about your applications - are the publisher and subscriber running locally on z/OS, or client connected, and from what environment (e.g. is JMS involved?)  Are any QM hops involved or is this all single qmgr (PROPCTL on QM->QM channels might be affecting things if the former).

    Also how are you trying to access the properties at the subscriber side (manually parsing RFH2 or via the message handle?)

    Thanks
    Anthony

    ------------------------------
    Anthony Beardsmore
    IBM MQ Development
    IBM
    ------------------------------



  • 3.  RE: missing pubsub properties

    IBM Champion
    Posted Mon March 07, 2022 12:18 PM

    Hi Ant,
    Thanks for your reply.   Ive used the samples provided on midrange and have the same problem

    /opt/mqm/samp/bin/amqspubc /currency/rate/EUR/USD CSQ9
    Sample AMQSPUBA start
    target topic is /currency/rate/EUR/USD
    ffff

    Sample AMQSPUBA end
    _______________________

    Sample AMQSIQMA start
    property name <MQTopicString> value </currency/rate/EUR/USD>
    property name <MQSubUserData> value <CZZZ>
    message text <ffff>
    Sample AMQSIQMA end

    _____________________________

    The queue has
    CSQM201I %CSQ9 CSQMDRTC DIS QLOCAL DETAILS 251
    QUEUE(CP0000)
    TYPE(QLOCAL)
    QSGDISP(QMGR)
    PROPCTL(COMPAT)
    END QLOCAL DETAILS
    ________________

    Dis tpstatus gives

    %CSQ9 DIS TPSTATUS('/currency/rate/EUR/USD')
    gives

    CSQM201I %CSQ9 CSQMDRTC DIS TPSTATUS DETAILS 258
    TPSTATUS(/currency/rate/EUR/USD)
    TYPE(TOPIC)
    DEFPRESP(SYNC)
    DEFPSIST(NO)
    DEFPRTY(0)
    DURSUB(YES)
    PUB(ENABLED)
    SUB(ENABLED)
    ADMIN()
    MDURMDL(SYSTEM.DURABLE.MODEL.QUEUE)
    MNDURMDL(SYSTEM.NDURABLE.MODEL.QUEUE)
    NPMSGDLV(ALLAVAIL)
    PMSGDLV(ALLDUR)
    RETAINED(YES)
    PUBCOUNT(1)
    SUBCOUNT(2)
    PUBSCOPE(ALL)
    SUBSCOPE(ALL)
    CLUSTER()
    USEDLQ(YES)
    CLROUTE(NONE)

    the amqs* are attached as clients to the same queue manager.  No other queue manager are involved.

    regards

    Colin









    ------------------------------
    Colin Paice
    ------------------------------



  • 4.  RE: missing pubsub properties

    IBM Champion
    Posted Tue March 08, 2022 09:40 AM
    Ive reproduced it on midrange
    def sub(COLIN) topicstr('/currency/rate/EUR/USD') dest(CP0000)

    /opt/mqm/samp/bin/amqspub /currency/rate/EUR/USD QMA
    Sample AMQSPUBA start
    target topic is /currency/rate/EUR/USD
    123456

    opt/mqm/samp/bin/amqsiqm CP0000 QMA
    Sample AMQSIQMA start
    property name <MQTopicString> value </currency/rate/EUR/USD>
    message text <123456>
    Sample AMQSIQMA end

    where are the rest of the expected properties?


    Colin




    ------------------------------
    Colin Paice
    ------------------------------



  • 5.  RE: missing pubsub properties

    Posted Tue March 08, 2022 10:24 AM

    Hi Colin

    I was just about to reply to your earlier message when I saw this had come through too.


    I think this is because you are using an administratively defined subscription which defaults to PSPROP(COMPAT).  The pub sub properties will be added to an RFH1 header, and will NOT then be automatically parsed out when getting via message handle.  Modifying the sub to PSPROP(MSGPROP) for example would give the behaviour you expected I think.

    As so often with 'odd looking' defaults on MQ objects, the PSPROP and PROPCTL attributes on topics/subs/queues were chosen with an eye to minimising migration pain, particularly in the leap to 'integrated' publish subscribe at version 7 (where many customers were moving from IBM Message Broker publish subscribe or the older pub sub support pack mode of operation).  In a greenfield environment it is likely that avoiding COMPAT and making everything MessageHandle or possibly RFH2 based is likely to be much clearer.

    Hope this helps,
    Regards

    Anthony



    ------------------------------
    Anthony Beardsmore
    IBM MQ Development
    IBM
    ------------------------------



  • 6.  RE: missing pubsub properties

    IBM Champion
    Posted Wed March 09, 2022 03:32 AM
    Hi Ant,

    I have that property specified on mid range.
         3 : dis sub(COLIN) ALL
    AMQ8096I: IBM MQ subscription inquired.
       SUBID(414D5120514D41202020202020202020B1682762030DF225)
       SUB(COLIN)                              TOPICSTR(/currency/rate/EUR/USD)
       TOPICOBJ( )                             DISTYPE(RESOLVED)
       DEST(CP0000)                            DESTQMGR( )
       PUBAPPID( )                             SELECTOR( )
       SELTYPE(NONE)                           USERDATA( )
       PUBACCT(0431303030000000000000000000000000000000000000000000000000000006)
       DESTCORL(414D5120514D41202020202020202020B1682762030DF225)
       DESTCLAS(PROVIDED)                      DURABLE(YES)
       EXPIRY(UNLIMITED)                       PSPROP(MSGPROP)
       PUBPRTY(ASPUB)                          REQONLY(NO)
       SUBSCOPE(ALL)                           SUBLEVEL(1)
       SUBTYPE(ADMIN)                          VARUSER(ANY)
       WSCHEMA(TOPIC)                          SUBUSER(colinpaice)
       CRDATE(2022-03-08)                      CRTIME(14:35:57)
       ALTDATE(2022-03-08)                     ALTTIME(14:35:57)

    WhenI display the message content as well as the properties, I do not see the additional information

    regards

    Colin