activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moreno9000 <moreno.ma...@italtel.it>
Subject Re: sendFailIfNoSpace=true, no JMSException for Producer
Date Thu, 29 Oct 2009 10:15:54 GMT

Thank you Gary!

I changed activemq.xml for my queue (NAM_QUEUE_01) in this way:

<destinationPolicy>
   <policyMap>
      <policyEntries>
         <policyEntry topic=">" producerFlowControl="true"
memoryLimit="1mb">
            <pendingSubscriberPolicy>
               <vmCursor />
            </pendingSubscriberPolicy>
         </policyEntry>
         </policyEntry>
            <policyEntry queue="NAM_QUEUE_01" producerFlowControl="false"
memoryLimit="20kb">
         </policyEntry>
       </policyEntries>
    </policyMap>
</destinationPolicy> 

and in jndi.properties file (used by the Producer) :

java.naming.provider.url = tcp://172.22.123.139:61616?jms.useAsyncSend=false

But it doesn'w work :-(

Now, no exceptions for Producer and for AMQ too.

Moreno



Gary Tully wrote:
> 
> you need to turn off producer flow control so that you will be blocked by
> the queue and also have your producer use sync send (as it defaults to
> async
> sending for non persistent or non transactional messages) so that you can
> catch any exception.
> 
> 
> 2009/10/28 moreno9000 <moreno.mauri@italtel.it>
> 
>>
>> Hi all,
>> I'm using AMQ 5.3 with a Producer that sends 10.000 very small msg
>> (1kb for msg, no persistence) to a queue.
>> No consumers are listening to the queue.
>>
>> In activemq.xml this is System Usage configuration:
>>
>> <systemUsage>
>>   <systemUsage sendFailIfNoSpace="true">
>>      <memoryUsage>
>>         <memoryUsage limit="20 kb"/>
>>      </memoryUsage>
>>      <storeUsage>
>>          <storeUsage limit="1 gb" name="foo"/>
>>      </storeUsage>
>>      <tempUsage>
>>           <tempUsage limit="100 mb"/>
>>      </tempUsage>
>>   </systemUsage>
>> </systemUsage>
>>
>> AMQ throws the following exception after having received 20 msg:
>>
>> WARN | Async error occurred: javax.jms.ResourceAllocationException: Usage
>> Manager memory limit
>> reached. Stopping producer (ID:vlab_1_1_1-34012-1256728549176-0:0:1:1) to
>> prevent flooding
>> queue://NAM_QUEUE_01. See
>> http://activemq.apache.org/producer-flow-control.html for more info
>> javax.jms.ResourceAllocationException:
>> Usage Manager memory limit reached. Stopping producer
>> (ID:vlab_1_1_1-34012-1256728549176-0:0:1:1)
>> to prevent flooding queue://NAM_QUEUE_01.
>> See http://activemq.apache.org/producer-flow-control.html for more info
>>
>> This is ok but I also expected the Producer to receive a JMSException.
>>
>> It doesn't receive anything and goes on sending all 10.000 msg.
>> After having sent all msg, AMQ console displays only 20 pending msg.
>> A following consumer reads these 20 msg.
>>
>> This is the normal behaviour or Producer's sends had to fail
>> (with an Exception) from 21th to 10000th attempt?
>>
>> Many thanks in advance for any reply.
>> Moreno
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/sendFailIfNoSpace%3Dtrue%2C-no-JMSException-for-Producer-tp26094263p26094263.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: http://www.nabble.com/sendFailIfNoSpace%3Dtrue%2C-no-JMSException-for-Producer-tp26094263p26110380.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message