if you want to enforce a broker wide limit that ignores client values
then implementing a broker plugin is the way to go. see examples at:
https://github.com/apache/activemq/tree/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/util

like the 
https://github.com/apache/activemq/blob/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/util/DestinationPathSeparatorBroker.java

On 20 March 2014 13:57, Gary Tully <gary.tu...@gmail.com> wrote:
> the broker entries are overrides for the default values. so if the
> client does not specify a value it will have the default and then the
> broker policy will override that.
> so the client is in control if it wants to be.
> see the code: 
> https://github.com/apache/activemq/blob/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java#L307
>
> On 20 March 2014 03:52, vlaxmi <vlaxmi.pa...@gmail.com> wrote:
>> Hi,
>>
>> I want to set the topic prefetch limit such that it will be applied to all
>> consumers of that topic.
>>
>> I tried to set the same -
>>  <destinationPolicy>
>>             <policyMap>
>>               <policyEntries>
>>                   <policyEntry topic="test" topicPrefetch="500"
>> advisoryForDiscardingMessages="true" advisoryForSlowConsumers="true">
>>                         <pendingMessageLimitStrategy>
>>                               <constantPendingMessageLimitStrategy 
>> limit="200"/>
>>                         </pendingMessageLimitStrategy>
>>                   </policyEntry>
>>               </policyEntries>
>>             </policyMap>
>>         </destinationPolicy>
>>
>> However, it does not set the prefetch size to 500 for the consumer.
>>
>> This works only if I set the prefetch on consumer config -
>> tcp://localhost:61616?jms.prefechPolocy.topicPrefetch=500
>>
>> Is there any way I can set the topic prefetch in broker config -
>> activemq.xml ?
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://activemq.2283324.n4.nabble.com/prefetch-size-in-broker-config-activemq-xml-tp4679253.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
>
> --
> http://redhat.com
> http://blog.garytully.com



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

Reply via email to