ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » MQ Message how to get the timestamp

Post new topic  Reply to topic
 MQ Message how to get the timestamp « View previous topic :: View next topic » 
Author Message
alm_doors
PostPosted: Thu May 28, 2009 12:05 am    Post subject: MQ Message how to get the timestamp Reply with quote

Newbie

Joined: 24 May 2009
Posts: 4

Hi everybody,

I need to read the timestamp of my MQMessage , does anybody knows any method how to get it ?

Thx in advance,
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 28, 2009 12:19 am    Post subject: Re: MQ Message how to get the timestamp Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

alm_doors wrote:
I need to read the timestamp of my MQMessage , does anybody knows any method how to get it ?


Interogate the timestamp property?

I'm assuming I'm misunderstanding the question here.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
alm_doors
PostPosted: Thu May 28, 2009 12:24 am    Post subject: Re: MQ Message how to get the timestamp Reply with quote

Newbie

Joined: 24 May 2009
Posts: 4

Vitor wrote:
alm_doors wrote:
I need to read the timestamp of my MQMessage , does anybody knows any method how to get it ?


Interogate the timestamp property?

I'm assuming I'm misunderstanding the question here.


I need to know the exact time the message was put on the queue.. which I thougt I could get it through timestamp... Is that possible and how??
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 28, 2009 12:29 am    Post subject: Re: MQ Message how to get the timestamp Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

alm_doors wrote:
I need to know the exact time the message was put on the queue.. which I thougt I could get it through timestamp... Is that possible and how??


It is possible and I again recommend the timestamp property (which contains the time the message was put) to you. Your question just seemed a little obvious earlier.

Naturally the accuracy of the time is dependant on the system clock.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
alm_doors
PostPosted: Thu May 28, 2009 12:36 am    Post subject: Re: MQ Message how to get the timestamp Reply with quote

Newbie

Joined: 24 May 2009
Posts: 4

Vitor wrote:
alm_doors wrote:
I need to know the exact time the message was put on the queue.. which I thougt I could get it through timestamp... Is that possible and how??


It is possible and I again recommend the timestamp property (which contains the time the message was put) to you. Your question just seemed a little obvious earlier.

Naturally the accuracy of the time is dependant on the system clock.


Sorry I am the absolutely beginner I have MQMessage mess =
how can I get this property ??
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 28, 2009 12:40 am    Post subject: Re: MQ Message how to get the timestamp Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

alm_doors wrote:
Sorry I am the absolutely beginner I have MQMessage mess =
how can I get this property ??


Firstly - get some training. Push back on your management, this is not the easiest stuff to teach yourself (though experimentation is a valid method of expanding on your knowledge). Note that this forum is not a training resource.

Secondly - refer to the relevent documentation. I'm assuming you're using Java and the manual helpfully titled "Using Java" will tell you everything you need to know on this.

(Obviously if I'm wrong and you're using .NET, the manually helpfully titled "Using .NET" will be more use to you......)

You'll find a link convieniently provided at the top of this page.

Happy Reading!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
alm_doors
PostPosted: Thu May 28, 2009 1:01 am    Post subject: Re: MQ Message how to get the timestamp Reply with quote

Newbie

Joined: 24 May 2009
Posts: 4

thx for the tip

Syntax: To get: datetime = MQMessage.PutDateTime

To set: MQMessage.PutDateTime = datetime
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu May 28, 2009 3:48 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Since an application can set the Put Date and Time itself, if its authorized to do so and if it uses the correct options, you can't trust this value 100% to accurately tell you when the message hit the queue.

And if the app did allow the Queue Manager to set the message's time but it was originally put on a remote q manager, the time will be from that put, not when it finally landed on your queue.

If you are getting the oldest message on the queue, you can use the Oldest Message Age property of the queue to determine when the message landed there.

Otherwise you will need an API Exit to log the MQPUT times. If you want to be 100% sure when a message landed on a queue.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 28, 2009 3:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

PeterPotkay wrote:
And if the app did allow the Queue Manager to set the message's time but it was originally put on a remote q manager, the time will be from that put, not when it finally landed on your queue.


Good point.

PeterPotkay wrote:
Otherwise you will need an API Exit to log the MQPUT times. If you want to be 100% sure when a message landed on a queue.


With the standard disclaimers about exits. Especially for a self-proclaimed "absolute beginner".
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 28, 2009 7:43 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And don't forget as long as we are discussing times that there also is a difference between put time and commit time.

Typically commit time is the time when the outgoing message becomes available. So if you are using a UOW the put time and commit time may differ.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ Message how to get the timestamp
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.