activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé BARRAULT <herve.barra...@gmail.com>
Subject Re: Delete queues from JDBC storage
Date Fri, 19 Aug 2011 11:39:24 GMT
Hi,
For the purge mechanism i have found one simple modification, that you can
try to apply to see if purge is faster (for my simple case i divided the
duration by 5 but my table was small and the duration seems not linear with
the number of messages).

It is quite simple : add an index based on the column used by activeMQ to
(select/delete).

You can run the following SQL request to add an index :
  CREATE UNIQUE INDEX ACTIVEMQ_MSGS_FULLIDX ON ACTIVEMQ_MSGS ("MSGID_PROD",
"MSGID_SEQ", "CONTAINER");

Concerning the "patch", we have done some performance tests with activeMQ
using JDBC persistence and Database admin suggests more modification than
adding this index. (Some other tests are pending to try to well understand
the behavior).

But, we will have to modify some part of the JDBC store and i'm not really
sure that there will be no side effect.
Some exchange with someone who knows the jdbc store code could be useful to
avoid some regression in a proposed patch.

Or is there a documentation which explains clearly the mechanism ? When
looking the code i've seen some coded herited from ActiveMQ 4.X which is no
more used in ActiveMQ 5.X and it is a bit hard to understand all calls.

Regards
Hervé


2011/8/19 Gary Tully <gary.tully@gmail.com>

> Hervé, can you open a jira issue to track this and attach your changes
> as a patch with an ASF grant.
>
> thanks.
>
> On 19 August 2011 09:02, Hervé BARRAULT <herve.barrault@gmail.com> wrote:
> > Hi,
> > As you notice this, i have written a post about the subject of the purge
> > method in activemq which is really slow when using persistence (in my
> case
> > JDBC).
> > I had proposed something but there was any response.
> >
> > 2011/8/19 Pham Ngoc Hai <pngochai@yahoo.com>
> >
> >> I tried with JMX and it took a few hours to purge a queue with 50000
> msgs.
> >>
> >>
> >>
> >> --- On Thu, 8/18/11, Dejan Bosanac <dejan@nighttale.net> wrote:
> >>
> >> > From: Dejan Bosanac <dejan@nighttale.net>
> >> > Subject: Re: Delete queues from JDBC storage
> >> > To: users@activemq.apache.org
> >> > Date: Thursday, August 18, 2011, 6:36 PM
> >> > Why don't you delete it using JMX or
> >> > web console?
> >> >
> >> > Regards
> >> > --
> >> > Dejan Bosanac - http://twitter.com/dejanb
> >> > -----------------
> >> > The experts in open source integration and messaging -
> >> http://fusesource.com
> >> > ActiveMQ in Action - http://www.manning.com/snyder/
> >> > Blog - http://www.nighttale.net
> >> >
> >> >
> >> > On Thu, Aug 18, 2011 at 11:51 AM, Pham Ngoc Hai <pngochai@yahoo.com>
> >> > wrote:
> >> >
> >> > > Hi, I'm using JDBC as storage, is it sufficient to
> >> > delete a queue by
> >> > > deleting it from the tables with
> >> > > DELETE FROM activemq_msgs where
> >> > container='queue://name'
> >> > > DELETE FROM activemq_acks where
> >> > container='queue://name'
> >> > >
> >> > > Regards,
> >> > > Ngoc Hai
> >> > >
> >> > >
> >> >
> >>
> >
>
>
>
> --
> http://fusesource.com
> http://blog.garytully.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message