so using sync send (alwaysSyncSend=true) on the connection factory, and Usage.sendFailIfNoSpace in your config is what you need here. This should work and should be deterministic. If this is not the case, can you open a jira issue and attach your test case and we can get to the bottom of this. When the queue memory limit is reached and the system memory limit is *not* reached (such that no spooling to disk occurs) (or if you use a vmPendingMessageCursor (so messages are always in memory)) the send operation will fail with a ResourceAllocaitonException which will be propagated back to the client, which will be blocked because of the sync send.
2009/11/25 moreno9000 <moreno.ma...@italtel.it> > > Yes, it's like producer flow control. > In 5.3 I tried to use prod.f.c. but client side > I received an exception only using an async listener > (what I need is a sync notification when queue is full). > > Your last sentence ("You'll need to do much more > than just a BrokerFilter to achieve this behavior") > sounds worrying :-( > > > bsnyder wrote: > > > > On Tue, Nov 24, 2009 at 3:16 AM, moreno9000 <moreno.ma...@italtel.it> > > wrote: > >> > > > >> Client side: I'd like to raise an exception to producer in order > >> to say it "Please, stop sending messages till messages are read > >> by a consumer". > > > > This sounds similar to the way that producer flow control works: > > > > http://activemq.apache.org/producer-flow-control.html > > > > The difference is in the predicate you're using. Instead of keying on > > the amount of memory available, you're keying on the number of > > messages currently in the destination. You'll need to do much more > > than just a BrokerFilter to achieve this behavior. > > > > Bruce > > -- > > > > -- > View this message in context: > http://old.nabble.com/How-to-%22activate%22-an-interceptor-tp26478807p26508992.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source Integration http://fusesource.com