You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jim Lloyd <jl...@silvertailsystems.com> on 2010/11/10 23:18:19 UTC

memoryLimit in wild-carded policyEntry

Suppose I have topics a.1, a.2, a.3, ..., a.N and I configure my broker's
destinationPolicy as follows:

        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry topic="a.>" producerFlowControl="false"
memoryLimit="128mb">
                        <pendingSubscriberPolicy>
                            <vmCursor />
                        </pendingSubscriberPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

Is the 128mb limit a total cap on all traffic to a.>, or is it 128Mb for
each of the N topics?

Thanks,
Jim Lloyd

Re: memoryLimit in wild-carded policyEntry

Posted by Jim Lloyd <jl...@silvertailsystems.com>.
Ahh, excellent. Thanks!

On Thu, Nov 11, 2010 at 1:08 AM, Gary Tully <ga...@gmail.com> wrote:

> You are setting a limit for each 'a.' destination but the limit is
> applied to a shared resource so it can be a global cap. Each
> destination will use up to 128Mb of the broker memoryUsage limit, if
> it can.
>
> The shared memory resource is configured via the broker
> <systemUsage><memoryUsage /> attributes and typically this needs to be
> large enough to accommodate all of the destinations limits, other wise
> the usage of one destination will interfere with the usage of others.
> For example, if the broker  is configured to have just 128Mb in
> memoryUsage, then the first destination to reach the 128Mb limit will
> effectively block all destinations. This may or may not be what you
> want.
>
> Note: all of the limits are applied to approximate internal memory
> usage values based on message size etc, but are not based on real JVM
> stats. Typically, the JVM heap needs to be configured to exceed the
> broker systemUsage limit by about 30%
>
> On 10 November 2010 22:18, Jim Lloyd <jl...@silvertailsystems.com> wrote:
> > Suppose I have topics a.1, a.2, a.3, ..., a.N and I configure my broker's
> > destinationPolicy as follows:
> >
> >        <destinationPolicy>
> >            <policyMap>
> >                <policyEntries>
> >                    <policyEntry topic="a.>" producerFlowControl="false"
> > memoryLimit="128mb">
> >                        <pendingSubscriberPolicy>
> >                            <vmCursor />
> >                        </pendingSubscriberPolicy>
> >                    </policyEntry>
> >                </policyEntries>
> >            </policyMap>
> >        </destinationPolicy>
> >
> > Is the 128mb limit a total cap on all traffic to a.>, or is it 128Mb for
> > each of the N topics?
> >
> > Thanks,
> > Jim Lloyd
> >
>
>
>
> --
> http://blog.garytully.com
> http://fusesource.com
>

Re: memoryLimit in wild-carded policyEntry

Posted by Gary Tully <ga...@gmail.com>.
You are setting a limit for each 'a.' destination but the limit is
applied to a shared resource so it can be a global cap. Each
destination will use up to 128Mb of the broker memoryUsage limit, if
it can.

The shared memory resource is configured via the broker
<systemUsage><memoryUsage /> attributes and typically this needs to be
large enough to accommodate all of the destinations limits, other wise
the usage of one destination will interfere with the usage of others.
For example, if the broker  is configured to have just 128Mb in
memoryUsage, then the first destination to reach the 128Mb limit will
effectively block all destinations. This may or may not be what you
want.

Note: all of the limits are applied to approximate internal memory
usage values based on message size etc, but are not based on real JVM
stats. Typically, the JVM heap needs to be configured to exceed the
broker systemUsage limit by about 30%

On 10 November 2010 22:18, Jim Lloyd <jl...@silvertailsystems.com> wrote:
> Suppose I have topics a.1, a.2, a.3, ..., a.N and I configure my broker's
> destinationPolicy as follows:
>
>        <destinationPolicy>
>            <policyMap>
>                <policyEntries>
>                    <policyEntry topic="a.>" producerFlowControl="false"
> memoryLimit="128mb">
>                        <pendingSubscriberPolicy>
>                            <vmCursor />
>                        </pendingSubscriberPolicy>
>                    </policyEntry>
>                </policyEntries>
>            </policyMap>
>        </destinationPolicy>
>
> Is the 128mb limit a total cap on all traffic to a.>, or is it 128Mb for
> each of the N topics?
>
> Thanks,
> Jim Lloyd
>



-- 
http://blog.garytully.com
http://fusesource.com