Sure you can. Have you tried it?

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 Sat, Aug 20, 2011 at 4:16 AM, Pham Ngoc Hai <pngoc...@yahoo.com> wrote:

> So deleting directly from DB is not an option? even when I stop the broker?
>
> Regards,
> Ngoc Hai
>
>
>
>
> --- On Fri, 8/19/11, Hervé BARRAULT <herve.barra...@gmail.com> wrote:
>
> > From: Hervé BARRAULT <herve.barra...@gmail.com>
> > Subject: Re: Delete queues from JDBC storage
> > To: users@activemq.apache.org
> > Date: Friday, August 19, 2011, 6:39 PM
> > 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.tu...@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.barra...@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 <pngoc...@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 <de...@nighttale.net>
> > wrote:
> > > >>
> > > >> > From: Dejan Bosanac <de...@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 <pngoc...@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
> > >
> >
>

Reply via email to