activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: How to configure this combination of queue cursors?
Date Thu, 01 Aug 2013 18:01:23 GMT
You can create your own PendingQueueMessageStoragePolicy.

Have a look
at org.apache.activemq.broker.region.policy.StorePendingQueueMessageStoragePolicy..
you can implement the method #getQueuePendingMessageCursor and return the
following:

        StoreQueueCursor cursor = new StoreQueueCursor(broker,queue);
        cursor.setNonPersistent(new
VMPendingMessageCursor(queue.isPrioritizedMessages()));
        return cursor;



On Thu, Aug 1, 2013 at 10:45 AM, Jake Choi <jw@yahoo-inc.com> wrote:

> Then the problem is, with persistent=false, I can't use the persistent
> adapter and it's always configured to be MemoryPersistentAdapter.
>
> ceposta wrote
> > just set persistent=false to force non-persistent messages to use
> > VMPendingMessageCursor
> > the default for the persistent part is QueueStorePrefetch
> >
> >
> > On Thu, Aug 1, 2013 at 9:59 AM, Jake Choi &lt;
>
> > jw@
>
> > &gt; wrote:
> >
> >> ActiveMQ 5.7 (embedded broker only with activemq-core-5.7.0.jar)
> >> ---
> >>
> >> I couldn't seem find a way to configure the following combination of
> >> pending
> >> message cursors for a certain queue:
> >>
> >>   queue cursor
> >>     non-persistent cursor => VMPendingMessageCursor
> >>     persistent cursor => QueueStorePrefetch
> >>
> >> From my understanding, there are 2 factors through that I can tweak the
> >> types of PendingMessageCursor for both non-persistent and persistent
> >> messages: BrokerService#isPersistent &&
> >> PolicyEntry#setPendingQueuePolicy,
> >> and I couldn't find a way to make the above combination.
> >>
> >> FYI, the requirement is that, for the queues, I want per-destination
> >> memory
> >> limit + PFC for non-persistent messaging while leaving it to use the
> >> back-ed
> >> persistent store & store-based cursor for the persistent messaging.
> >>
> >> Thanks,
> >> Jake
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://activemq.2283324.n4.nabble.com/How-to-configure-this-combination-of-queue-cursors-tp4670003.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >
> >
> >
> > --
> > *Christian Posta*
> > http://www.christianposta.com/blog
> > twitter: @christianposta
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/How-to-configure-this-combination-of-queue-cursors-tp4670003p4670005.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

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