Author |
Message
|
kun.leeing |
Posted: Mon Apr 20, 2009 9:07 pm Post subject: How to use Cleanup thread? |
|
|
 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 |
|
 |
mqjeff |
Posted: Tue Apr 21, 2009 3:15 am Post subject: |
|
|
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 |
|
 |
kun.leeing |
Posted: Tue Apr 21, 2009 5:52 am Post subject: |
|
|
 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 |
|
 |
mqjeff |
Posted: Tue Apr 21, 2009 5:55 am Post subject: |
|
|
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 |
|
 |
kun.leeing |
Posted: Tue Apr 21, 2009 6:59 am Post subject: |
|
|
 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 |
|
 |
mqjeff |
Posted: Tue Apr 21, 2009 7:04 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Tue Apr 21, 2009 7:08 am Post subject: |
|
|
 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 |
|
 |
kun.leeing |
Posted: Tue Apr 21, 2009 9:25 am Post subject: |
|
|
 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 |
|
 |
|