On Wed, Nov 25, 2009 at 8:19 AM, moreno9000 <moreno.ma...@italtel.it> wrote: > > Now everything works! > Thank you Gary (and bsnyder too) ! > > This was the final configuration. > > Client Side > ---------- > In java code I use ActiveMQConnectionFactory > (previously, I used "generic" JMS ConnectionFactory) in order > to call connectionFactory.setAlwaysSyncSend(true) method. > > In jndi.properties file I specify in this way AMQ URL: > java.naming.provider.url = tcp://<my > host>:61616?wireFormat.maxInactivityDuration=0&jms.useAsyncSend=false > > ServerSide > ---------- > In AMQ 5.3 xml conf file: > > <destinationPolicy> > <policyMap> > <policyEntries> > <policyEntry queue="NAM_QUEUE_01" producerFlowControl="true" > advisoryWhenFull="true" > memoryLimit="20 kb"> > <pendingQueuePolicy> > <vmQueueCursor/> > </pendingQueuePolicy> > </policyEntry> > </policyEntries> > </policyMap> > </destinationPolicy> > > <systemUsage> > <systemUsage sendFailIfNoSpace="true"> > <memoryUsage> > <memoryUsage limit="200 mb"/> > </memoryUsage> > <storeUsage> > <storeUsage limit="1 gb" name="foo"/> > </storeUsage> > <tempUsage> > <tempUsage limit="100 mb"/> > </tempUsage> > </systemUsage> > > With setAlwaysSyncSend() method, client receives > ResourceAllocationException. > With <vmQueueCursor/> policy, exception is raised in a deterministic way > (in my tests always after 20 messages). > > There is no reason to test 5.4 SNAPSHOT (5.3. is already good). > I try to redo this test using 5.1 release.
This is why I asked about your use case. I wanted to distinguish the use case from the code you were trying to write as the two are distinctly separate items. I'm glad that Gary's suggestion worked out. Bruce -- perl -e 'print unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' ActiveMQ in Action: http://bit.ly/2je6cQ Blog: http://bruceblog.org/ Twitter: http://twitter.com/brucesnyder