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 » How to delete old messages

Post new topic  Reply to topic
 How to delete old messages « View previous topic :: View next topic » 
Author Message
Shailesh
PostPosted: Wed Apr 24, 2002 11:25 am    Post subject: Reply with quote

Newbie

Joined: 23 Apr 2002
Posts: 3
Location: New York

How can I delete old messages in my queue without reading them. For reading I have to Get those messages and when I do this I'm actually removing the message from the queue. If I'm putting that message into the queue back it is no more an old message. Any suggestion.........??
Back to top
View user's profile Send private message Send e-mail
jeeth_m
PostPosted: Wed Apr 24, 2002 11:43 am    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

use CLEAR QLOCAL(q name) this will remove the messages in the Q.
is this what u were looking for?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Shailesh
PostPosted: Wed Apr 24, 2002 12:40 pm    Post subject: Reply with quote

Newbie

Joined: 23 Apr 2002
Posts: 3
Location: New York

No. Actually, say I've 10 messages and I've to delete a few messages depending on the date. For e.g. if the messages are 5 day old then delete them. Now to find out that how old a message is I've to Dequeue the message from the Queue. If the message is not old enough I've to put it back to the Queue. But if I'll enqueue the message it will become a new message as the date and time stamp of the message will change. I want to acheive this using Visual Basic.
Back to top
View user's profile Send private message Send e-mail
crojas
PostPosted: Wed Apr 24, 2002 12:49 pm    Post subject: Reply with quote

Apprentice

Joined: 10 Mar 2002
Posts: 28

I think you have 2 options:

1.- Make applications using expity option to 5 days, so you don't have to mantain the system.

If you can't:

2.- Build a program that get a message using the BROWSE, and just GET_UNDER_CURSOR the messages that are older than you want.

Regards
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Apr 25, 2002 3:47 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

The date and time stamp do not have to change. These two fields are part of the origin context, which you can set yourself. When you reput the message, set the MQPMO_SET_ALL_CONTEXT option.

But if your logic is only going to say "Hey is this message older than n days? If yes, get rid of it." why bother? Set the EXPIRY value accordingly and let MQ delete these messages for you.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Shailesh
PostPosted: Thu Apr 25, 2002 5:15 am    Post subject: Reply with quote

Newbie

Joined: 23 Apr 2002
Posts: 3
Location: New York

Thanks a lot!!! This solves the purpose.
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 » How to delete old messages
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.