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 » IBM MQ API Support » time dependent

Post new topic  Reply to topic
 time dependent « View previous topic :: View next topic » 
Author Message
alperb
PostPosted: Tue Jun 01, 2004 9:14 pm    Post subject: time dependent Reply with quote

Apprentice

Joined: 01 Jun 2004
Posts: 25

I am new in MQ so I wanted to ask if another feasible solution is possible.
I want to get messages from queue depending on their put time.
For example I want get messaged put yesterday or today int the range 02:00 - 03:00. I thought putting corrID will solve my problem. Any other idea?
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Jun 01, 2004 10:45 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

MQ API calls does not allow you to get message by puttime. You need to browse the queue and GET only the messages which meet your criteria. If the application is setting CorrelID to some unique value for these messages then you can use get-by-correl-id feature.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Venku
PostPosted: Fri Jun 04, 2004 5:38 am    Post subject: Expiry Messages Reply with quote

Novice

Joined: 02 Jun 2004
Posts: 10
Location: Newyork

The destination application can put the messages with an expiry option say one day or 2 days. And if you try to get those messages after the expiry time they will not available to the application. They will reside in the queue and need to be removed. As posted here by kiran you can try reading with browse option and read the messages you need.
_________________
Venku
____________________
MQ, CICS & DB2 Consultant
Back to top
View user's profile Send private message
leongor
PostPosted: Sun Jun 06, 2004 4:09 am    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

Venku,
If message is expired it'll be removed automatically at the moment you will try to read it.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
Back to top
View user's profile Send private message
Venku
PostPosted: Mon Jun 07, 2004 3:32 am    Post subject: Expiry option Reply with quote

Novice

Joined: 02 Jun 2004
Posts: 10
Location: Newyork

Hi leogor, If we put a message onto a queue with an expiry option, will that message stay on in the queue after the expiry time?? Do we need to remove it physically or it will removed automatically by the queue manager?? Advance thanks
_________________
Venku
____________________
MQ, CICS & DB2 Consultant
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jun 07, 2004 4:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Hey Venkat.

Questions about message expiration are fairly common.

You might spend some time looking around at the other questions about the same thing, you could potentially learn a lot!

But, expired messages are not removed until someone tries to Get them.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
markt
PostPosted: Mon Jun 07, 2004 5:16 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

>> Expired messages are not removed until someone tries to get them

is not a true statement, and has not been true for some considerable time. There are no guarantees that a message will be removed before someone tries to get it, but there are certainly times that messages can be removed "asynchronously". It's even quite explicit on z/OS, where the EXPIRYINT attribute was added for V5.3 that drive a background task.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jun 07, 2004 5:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

markt wrote:
>> Expired messages are not removed until someone tries to get them

is not a true statement, and has not been true for some considerable time. There are no guarantees that a message will be removed before someone tries to get it, but there are certainly times that messages can be removed "asynchronously". It's even quite explicit on z/OS, where the EXPIRYINT attribute was added for V5.3 that drive a background task.


Certainly the case on z/OS is different.

However, the Application Programming Reference has the following to say
Quote:
After a message's expiry time has elapsed, it becomes eligible to be discarded by the queue manager. In the current implementations, the message is discarded when a browse or nonbrowse MQGET call occurs that would have returned the message had it not already expired. For example, a nonbrowse MQGET call with the MatchOptions field in MQGMO set to MQMO_NONE reading from a FIFO ordered queue will cause all the expired messages to be discarded up to the first unexpired message. With a priority ordered queue, the same call will discard expired messages of higher priority and messages of an equal priority that arrived on the queue before the first unexpired message.

Emphasis added. But, noting the rest of the quoted paragraph, it isn't as straightforward as I made it out to be.

But that's part of the reason Venkat should read some of the other postings on this topic here. There are probably postings that cover all of the various subtleties and nuances of the actual situation - and likely make it a little clearer than the manual does.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Venku
PostPosted: Mon Jun 07, 2004 5:57 am    Post subject: Expiry Message Reply with quote

Novice

Joined: 02 Jun 2004
Posts: 10
Location: Newyork

Hi Jeff & Mark, Thanks for the information.


Best wishes Venkat
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » time dependent
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.