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 Java / JMS » How to use Cleanup thread?

Post new topic  Reply to topic
 How to use Cleanup thread? « View previous topic :: View next topic » 
Author Message
kun.leeing
PostPosted: Mon Apr 20, 2009 9:07 pm    Post subject: How to use Cleanup thread? Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

Hi, everybody.

Using pub/sub, but the amout of messages in the default queue 'SYSTEM.JMS.ND.SUBSCRIBER.QUEUE' is increasing very fastly. why?

So I want to use Cleanup. But I run Cleanup at '/opt/mqm/java/bin', it tells me 'No Class Found.' Then I use the method provieded by 'com.ibm.mq.jms.Cleanup'

Code:
Cleanup myclean = new Cleanup();
myclean.setChannel(***);
myclean.setPort(**);
myclean.setQueueManager(***);
myclean.setCleanupInterval(1000);
myclean.setCleanupLevel(JMSC.MQJMS_CLEANUP_NONDUR);

myclean.run();


but it seems do nothing. The queues related are not clean.
How can I run the Cleanup thread? and How to use class Cleanup in user program?

Thanks.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Apr 21, 2009 3:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Messages on SYSTEM.JMS.ND.SUBSCRIBER.QUEUE are messages that you have published and that your subscribers are supposed to read.

Why aren't your subscribers reading them?
Back to top
View user's profile Send private message
kun.leeing
PostPosted: Tue Apr 21, 2009 5:52 am    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

I also don't know why there're so many messages in System.JMS.ND.subscriber.queue.
Maybe my publisher push message too fast?

Can it be clean?
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Apr 21, 2009 5:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It can be cleaned.

But then your subscribers won't get the messages.

It's better to make the subscribers read faster than it is to try and slow down the publisher.
Back to top
View user's profile Send private message
kun.leeing
PostPosted: Tue Apr 21, 2009 6:59 am    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

Thanks for reponse.

But now the problem is that the amout of messages on that queue have been increasing continually even though all subscribers have been closed.

Because of importance of the messages , I don't want to miss any message.

When the amout under 100000, the system is on a good performance. Beyond the number, system becomes very slow.

Does it sustain the messages belong to some subscribers that exit or have been terminiated? Can I clean those messages using pcf command directly? or I must use Cleanup thread?

Thanks.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Apr 21, 2009 7:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kun.leeing wrote:
But now the problem is that the amout of messages on that queue have been increasing continually even though all subscribers have been closed.

Then they haven't been properly closed somehow.

kun.leeing wrote:
Can I clean those messages using pcf command directly?

Even mqsc CLEAR QUEUE should work.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 21, 2009 7:08 am    Post subject: Reply with quote

Grand High Poobah

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

kun.leeing wrote:
Because of importance of the messages , I don't want to miss any message.


Then clearing the queue down seems a bit odd.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kun.leeing
PostPosted: Tue Apr 21, 2009 9:25 am    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

if they're not properly closed, can I clean all of the subscription info gracefully?

Cleanup can do what I want?

If using 'CLEAN QUEUE', I have to run it real time and that will clean all of messages.
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 » IBM MQ Java / JMS » How to use Cleanup thread?
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.