|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to find timestamp of message in queue |
« View previous topic :: View next topic » |
Author |
Message
|
pandeg |
Posted: Sun Feb 28, 2016 8:31 pm Post subject: How to find timestamp of message in queue |
|
|
Disciple
Joined: 21 Oct 2014 Posts: 195
|
Hi, I want to find the time stamp of the message in a queue. I have a JMS application which connects to MQ remote queue in client mode and puts the message in a remote queue. Is it possible to find how much time application takes to connect to MQ and put the message. Also , i want to know the timestamp at the MQ end. This is required to find the performance comparison when application is putting the messages locally to MQ versus when application is connecting to MQ remotely. Also, want to know that whether connection pooling plays any role when application connect to MQ remotely.Previously, all the JMS applications were connecting to local MQ installed on their server which then connects to central MQ using dedicated sender and receiver channel. Now , we have migrated all these JMS applications to connect directly to central MQ using server connections in client mode. when tested , we noticed that for around 250 transactions timespan increased from 7 mins to 25 mins when application was connecting to local MQ versus it is connecting directly to Central MQ. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Feb 28, 2016 11:10 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Do your applications connect, open, put, close, disconnect FOR EVERY message?
or do they hold the connection to the QMGR open while there is work to do
Opening a connection to a QMGR especially a remote one takes a lot of time especially if you are doing any sort of authentication.
The timestamp for the put of a message is in the message MQMD in two fields. This is a UTC/GMT time by the way.
The MQMD is fully documented. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 29, 2016 5:35 am Post subject: Re: How to find timestamp of message in queue |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
pandeg wrote: |
Hi, I want to find the time stamp of the message in a queue. I have a JMS application which connects to MQ remote queue in client mode and puts the message in a remote queue. Is it possible to find how much time application takes to connect to MQ and put the message. Also , i want to know the timestamp at the MQ end. |
As to your general problem I agree with smdavies... You need to look at how your connection pool is set up, how it cycles and how the connections are made.
As for your measurements...
System.currentTimeInMilliseconds() before and after the JMS interaction, as for the time on the message, after the put/send retrieve the time as a long with msg.getJMSTimestamp().
Be advised however that the JMSTimestamp may be off. This is dependent on how well your different servers are time synched (ntp). The system time will reflect the time on the client. The JMSTimestamp will be the time on the server. So there is a potential time difference between the client and the server.
Remember time calculations and saving time information should always be done in UTC. Change that only for display purposes to the local time.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
pandeg |
Posted: Mon Feb 29, 2016 10:37 am Post subject: |
|
|
Disciple
Joined: 21 Oct 2014 Posts: 195
|
Quote: |
Do your applications connect, open, put, close, disconnect FOR EVERY message?
or do they hold the connection to the QMGR open while there is work to do |
I am not sure how the application is behaving. I triggered around 277 transactions and found below log for sending the messages.
2016-02-29 15:59:31,051 INFO [out] transactions sent to central
2016-02-29 15:59:31,519 INFO [out] transactions sent to central
2016-02-29 15:59:31,971 INFO [out] transactions sent to central
2016-02-29 15:59:32,439 INFO [out] transactions sent to central
2016-02-29 15:59:32,907 INFO [out] transactions sent to central
2016-02-29 15:59:33,375 INFO [out] transactions sent to central
2016-02-29 15:59:33,827 INFO [out] transactions sent to central
2016-02-29 15:59:34,296 INFO [out] transactions sent to central
2016-02-29 15:59:34,764 INFO [out] transactions sent to central
2016-02-29 15:59:35,216 INFO [out] transactions sent to central
2016-02-29 15:59:35,902 INFO [out] transactions sent to central
from above log, you can see 2-3 messages are being sent in every seconds, I am not sure whether it is connecting, opening, putting, closing, disconnect FOR EVERY message?
Quote: |
Opening a connection to a QMGR especially a remote one takes a lot of time especially if you are doing any sort of authentication. |
We have disabled the authentication for application as they are in intranet. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Feb 29, 2016 11:01 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
You can
1) look at the application code
or
2) run the application trace utility to see what is happening.
However as you are running remotely, you need to look at the network link between the client and the server. Is there contention on the link?
Speak to your network people. Even a simple thing like auto-negociate and full/half duplex can make a difference to the throughput.
Only extensive testing will tell.
There is no simple answer if the clients are not doing a connect/open/put/close/disconnect for every message.
It might even be that what you are seeing is the best you can achieve. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Feb 29, 2016 4:36 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
pandeg wrote: |
Quote: |
Do your applications connect, open, put, close, disconnect FOR EVERY message?
or do they hold the connection to the QMGR open while there is work to do |
I am not sure how the application is behaving. I triggered around 277 transactions and found below log for sending the messages.
from above log, you can see 2-3 messages are being sent in every seconds, I am not sure whether it is connecting, opening, putting, closing, disconnect FOR EVERY message?
Quote: |
Opening a connection to a QMGR especially a remote one takes a lot of time especially if you are doing any sort of authentication. |
|
2-3 per sec is plausible for an app that connects, opens, puts, closes, disconnects for every message.
An efficient MQ client app that holds the connection and open handles should be able to achieve 30-100 per sec, mainly depending on other app logic (eg. DB interaction), MQ message size and network bandwidth. _________________ Glenn |
|
Back to top |
|
 |
pandeg |
Posted: Tue Mar 01, 2016 8:03 am Post subject: |
|
|
Disciple
Joined: 21 Oct 2014 Posts: 195
|
Thanks gbaddeley !
Quote: |
An efficient MQ client app that holds the connection and open handles should be able to achieve 30-100 per sec, mainly depending on other app logic (eg. DB interaction), MQ message size and network bandwidth. |
[/quote]
Can you please suggest how to achieve these transactions. I mean how to hold the the connection and handle so that I application can send these many transactions per secs. Is this application feature that developer has to implement or it is any server configurable feature. Our JMS application is deployed using jboss server(version 4). Also, it's a legacy code , not sure how much difficult it would be to modify the code if its the application logic. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 01, 2016 8:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It's basic programming to establish a connection, open a queue, and then start a loop to put or get messages.
MQ provides statistics and tracing that you can perform to determine how the application is behaving, without seeing the source code. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Mar 01, 2016 8:28 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Search for 'mq statistics and accounting.' _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|