View previous topic :: View next topic
|
Author |
Message |
Mariraj
New User
Joined: 09 Jul 2007 Posts: 59 Location: Chennai
|
|
|
|
We have a need to log all the messages written to different queues to the same table. We are planning to use DB2 stored procedures with MQ Listeners. One of the columns in the log table is used to indicate the source of the message (say Source1, Source2, etc).
know that the DB2 MQ Listener will deliver the message to the Stored Proc as input. I am trying to find out if there is any way to identify the source queue name in the stored procedure.
Appreciate your inputs on this.
Thanks. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
You can check SYSMQL.LISTENERS but why dont you design multiple SP's for different queue's and each SP does its own task as it should and make a MQ set up that way?
e.g.
Quote: |
If you want several different message types to be processed by different DB2 stored procedures (i.e., message type A drives an insert to DB2 table X, message type B is input to an update of table Y, etc.), set up several input queues, and associate with each the stored procedure that is to operate on a given message type. Then, have the input-providing application programs direct each message type to its designated queue.
Source1--->Queue name( say 'source1.queue')---> SP name( say source1) and so on... |
|
|
Back to top |
|
|
Mariraj
New User
Joined: 09 Jul 2007 Posts: 59 Location: Chennai
|
|
|
|
Hi Rohit,
Yes we can have individual SPs for each MQ. Since the table in which the MQ messages will be stored is the same, I am trying to find out if there is a way to use a common SP for all the MQs.
If I remember correctly, I have seen CICS modules using MQTM structure to identify the trigger information.
I am trying to find out if DB2 MQ Listener can provide any such info to the Stored Procedure or if there are any DB2 MQ functions to retrieve the info needed.
Thanks for your inputs. |
|
Back to top |
|
|
|