MQ series, MQMD usage

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf MQ series, MQMD usage

  • Creator
    Topic
  • #50350
    John Perks
    Participant

    I want to use an MQseries queue to ‘recycle’ messages.   I created a MQ queue and channel just for this purpose.   I want to use MQ because the messages are potentially very large and I did not want to tax the site performance by keeping them in the recovery database.  There are many Cloverleaf mqs threads which send to this specific queue and a single thread (or a few) which read from that queue.  I want to use the MQMD (when putting to the queue) to hold the thread name of the thread to which we want to re-route the message when it comes back from the inbound MQ thread.  For example,  I set the ‘Put Application Name’ in the MQMD Features window of the outbound thread to the name of a thread through which I want to recycle a message, and turn on the ‘Copy MQMD’ in the inbound MQ thread definition of the thread which will get the message back from MQ.  Doing this I am able to know where to route the message when it comes back from MQSeries.  But I have only been able to get this to work when I hard-code the thread name in the outbound thread’s MQMD screen.  Using msgmetaset msgId DRIVERCTL in a tclproc is also supposed to be a way of setting the MQMD, but I have not been successful in this method.  Using the tclproc method would eliminate dependencies on hard-coding in thread configurations; and more importantly I would not need one outbound MQ thread for every instance of a an inbound thread where this ‘recycling’ is to take place.   The basic question: can the MQMD values be set using a tclproc as described?  And if so what MQ open or put options are necessary to allow the thread to ‘pass’ this data to MQ?

    Attached is a snipit of the tclproc which is intended to set the MQMD values:

    keylget args MSGID mh

    set origSourceConn [msgmetaget $mh ORIGSOURCECONN]

    set PUTAPPLNAME

      keylset driverctl MQS $PUTAPPLNAME

      msgmetaset $mh DRIVERCTL $driverctl

      lappend dispList “CONTINUE $mh”

  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10