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 » Archive + Delete messages older then > x days

Post new topic  Reply to topic
 Archive + Delete messages older then > x days « View previous topic :: View next topic » 
Author Message
bschelst
PostPosted: Fri Oct 15, 2004 4:05 am    Post subject: Archive + Delete messages older then > x days Reply with quote

Novice

Joined: 30 May 2004
Posts: 16

Hello,

Does somebody knows how you can archive message in a queue, which are older then X days, and delete the afterwards.....in perl?


Bart
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Oct 15, 2004 5:08 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Here's some pseudo-code. You can dig around here and find examples of Perl programs that use the perl MQ API, that you can then reapply to this pseudo-code.

If you're asking for real working code, then you probably need to hire someone... This is not a hard thing to do. Really.

Code:

    Open a queue manager
   Open a queue for browsing
    While there are more messages to browse in the queue and the queue manager isn't failing
         browse a message
          if the message Put Time is older than time to archive then
                      get the message using it's MessageID
                      archive the message
          end if
     end while


This is a basic queue filter operation.

You are likely a lot better off simply using message expiration, and reporting with full data on expiration. Then you can archive the report message.
_________________
I am *not* the model of the modern major general.
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 » General IBM MQ Support » Archive + Delete messages older then > x days
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.