Author |
Message
|
sandeep1234 |
Posted: Mon Jul 11, 2011 11:35 am Post subject: MQ response time |
|
|
Newbie
Joined: 11 Jul 2011 Posts: 3
|
HI,
I am fairly new to MQ adminstration. I have a requirement to log the time when a message was put and when the response was recieved with a precission of 0.01 seconds.
both MQ server and Applilcation are on the same windows machine and We have queues defined with persistence option set to not persistent.
can you suggest how this could be achieved
Thanks in advance |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 11, 2011 12:02 pm Post subject: Re: MQ response time |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sandeep1234 wrote: |
when the response was recieved |
Is this the response to the put message? Or is the put message the response?
By "received" do you mean put to the queue, made available to the consuming application or consumed by the application?
Are you trying to capture total round trip time or the time WMQ takes to handle the message excluding any application overhead?
sandeep1234 wrote: |
We have queues defined with persistence option set to not persistent. |
Before someone else says it, queues are neither persistent nor non-persistent; persistence is a property of a message. Search the forum for seemingly endless debates on this point.
sandeep1234 wrote: |
can you suggest how this could be achieved |
The queue manager monitoring and statistics would seem to be a place to start.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 11, 2011 1:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I would have thought this is one for the application logs.
Be sure to make the difference between message is put to queue and message is commited to queue...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sandeep1234 |
Posted: Mon Jul 11, 2011 1:24 pm Post subject: |
|
|
Newbie
Joined: 11 Jul 2011 Posts: 3
|
hi,
To be more clear abt the requirement i have web application(app1) MQ and cics application(app2)
App1 puts a message on queue1, App2 reads and process this msg and then puts the result message in queue2.
I need to log the time when message was put on queu1 by app1 and when app2 puts the msg on queue2.
I hope i am clear enough
Thanks for the response |
|
Back to top |
|
 |
mvic |
Posted: Mon Jul 11, 2011 1:43 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
sandeep1234 wrote: |
I need to log the time when message was put on queu1 by app1 and when app2 puts the msg on queue2. |
Find the teams that own those programs, then ask them to insert code that writes this out.
If they refuse, you still have options like using API exits. There is a sample in amqsaxe0.c. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Jul 11, 2011 4:05 pm Post subject: Re: MQ response time |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
sandeep1234 wrote: |
..I have a requirement to log the time when a message was put and when the response was recieved with a precission of 0.01 seconds... |
What is the justification for this requirement? This type of logging is normally done in application coding. 0.01 second may not be precise enough, as MQ message processing times can occur at the 0.001 second level. _________________ Glenn |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 11, 2011 8:03 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sandeep1234 wrote: |
hi,
To be more clear abt the requirement i have web application(app1) MQ and cics application(app2)
App1 puts a message on queue1, App2 reads and process this msg and then puts the result message in queue2.
I need to log the time when message was put on queu1 by app1 and when app2 puts the msg on queue2.
I hope i am clear enough
Thanks for the response |
There are a few assumptions to be made here:
- app1 and app2 are on different hosts / platforms
- all times are being looked at in UTC
- ntp synchronizes the time between the different hosts in play
- app1 and app2's logs can be centralized and evaluated together
- There is enough horse power/ concurrent threads to avoid any queue depths and application induced latencies: a message received will be processed right away and not wait...
- app1 will log
- messageId
- correlationId
- time put to queue
- time committed to queue if different from time put
- time response was received
- timestamp of response message
- app2 will log
- messageId
- correlationId
- time message was received (to be processed)
- timestamp on received message
- time the response was put
- time the response was committed if different from put.
The evaluation will look at the same message thread defined by the messageId/correlationId and look at
- app1 latency =>time committed - time of put
- app1->app2 transport => app2 time received - timestamp on received message - app1 latency
- app2 perceived processing time => app2 time response committed - app2 time request received
- app2 latency => app2 time response committed - time response put
- app2->app1 transport => app1 time received - timestamp on received message - app2 latency
- app1 perceived total response time => time response received - time request committed
Mileage will vary by message size, log size, network conditions
Have fun with this  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sandeep1234 |
Posted: Tue Jul 12, 2011 7:24 am Post subject: |
|
|
Newbie
Joined: 11 Jul 2011 Posts: 3
|
Hi,
Thank you all for the responses. I was able to find 2 things
1. Start time when the message was sent from the web appliaction to MQ and the time when the reply was received from mq to the WEB application.
2. Processing time in the cobol application.
now i am left with MQ part and the Network part. As i understand from your response this can you done in 2 ways
1. By using API exit. I tried to find the code or compiled module for amqsaxe0.c but could not get it. Can you please provide a reference link where i can find this.
2. By using web application and cobol application writing those values into a file.
application owners are not able to find how this can be done. Web application is in C# and back end is in Cobol. Can you please post any reference links
once again thanks a lot for all your responses. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 12, 2011 7:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sandeep1234 wrote: |
1. By using API exit. I tried to find the code or compiled module for amqsaxe0.c but could not get it. Can you please provide a reference link where i can find this. |
Exits are an advanced topic. If you're not comfortable with both WMQ and C code I'd urge you to think twice.
sandeep1234 wrote: |
2. By using web application and cobol application writing those values into a file.
application owners are not able to find how this can be done. Web application is in C# and back end is in Cobol. Can you please post any reference links |
I'll assume the owners are able to identify how to write values to a file.
How to obtain the values are described in the InfoCenter section for the relevant language. If they've already discovered how to send and receive WMQ messages I'm slightly confused how they can have avoided exposure to the values you require. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mvic |
Posted: Tue Jul 12, 2011 7:31 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
sandeep1234 wrote: |
I tried to find the code or compiled module for amqsaxe0.c but could not get it. Can you please provide a reference link where i can find this. |
It is in your MQ install location, if you have installed the "samples". If you haven't installed the samples, then you can probably return to your installer and install them. |
|
Back to top |
|
 |
jeevan |
Posted: Tue Jul 26, 2011 10:12 am Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Thanks all for your insights. It is very helpful. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Jul 27, 2011 10:27 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
If you want commercial solution to your problem then have a look at MQ Auditor
Sample output:
Quote: |
2011/07/21 12:35:14.390, MQXF_PUT, A, PID=4404, TID=100, CC=0, RC=0, UserId=tester, HConn=7, HObj=10566816, PMO_Options=MQPMO_NO_SYNCPOINT+MQPMO_NEW_MSG_ID+MQPMO_RESPONSE_AS_Q_DEF+MQPMO_RESPONSE_AS_TOPIC_DEF, PMO_ResolvedQMgrName=MQWT2, PMO_ResolvedQName=AUDIT.QUEUE, MD_PutDate=2011/07/21, MD_PutTime=16:35:14.39, MD_MsgId=414D51204D5157543220202020202020C853284E20002202, MD_Format=MQSTR, MD_MsgType=MQMT_DATAGRAM, MD_Persistence=MQPER_PERSISTENCE_AS_Q_DEF, MD_UserId=tester, BufferLength=15, MsgDataAsHex=686B6A686B6A686B6A686B6A686B6A,
2011/07/21 12:36:21.234, MQXF_GET, A, PID=4404, TID=40, CC=0, RC=0, UserId=tester, HConn=5, HObj=10566816, GMO_Options=MQGMO_NO_WAIT+MQGMO_FAIL_IF_QUIESCING+MQGMO_NO_SYNCPOINT+MQGMO_ACCEPT_TRUNCATED_MSG+MQGMO_PROPERTIES_FORCE_MQRFH2, GMO_WaitInterval=0, GMO_ResolvedQName=AUDIT.QUEUE, GMO_MatchOptions=MQMO_MATCH_MSG_ID+MQMO_MATCH_CORREL_ID, MD_PutDate=2011/07/21, MD_PutTime=16:36:21.20, MD_MsgId=414D51204D5157543220202020202020C853284E20002202, MD_Format=MQSTR, MD_MsgType=MQMT_DATAGRAM, MD_Persistence=MQPER_NOT_PERSISTENT, MD_ReplyToQMgr=MQWT2, MD_UserId=tester, BufferLength=4096, DataLength=15, MsgDataAsHex=686B6A686B6A686B6A686B6A686B6A, |
Note: You can tailor the output to include some, all or none of the fields from PMO, GMO and MD structures.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|