Moreno,
Your issue is that you're using async send.  I believe this is the default
sending type for performance reasons.  However with async send, it puts your
send in a queue and performs the send out of the calling thread.  

What you need to do is explicitly disable async send on your producer (or
via the URI used to create the connection.  More info is here:
http://activemq.apache.org/async-sends.html

Once you turn this off on the connection your producer is created from,
you'll get exceptions in the thread that is calling send().  With async
send, you get better performance but you need to use an ExceptionListener to
determine if you get exceptions on your send.

Hope that helps Moreno.

- Brett Humphreys

moreno9000 wrote:
> 
> Yes, exception listener receives a notification when queue is full!
> 
> Is this the only way to get a send error?
> 
> (Perhaps I'm wrong, but I think that is much more simple to manage an
> exception 
> in the thread that exec send() instead of delegating this management 
> to exception listener's threads). 
> 
> Sorry if I'm disturbing you, Gary :-(
> 
> 
> Gary Tully wrote:
>> 
>> ah, my mistake, you still need to enable producerFlow control for your
>> queue, for 5.3 this was decoupled but only for persistent messages and
>> store
>> usage. (https://issues.apache.org/activemq/browse/AMQ-2343).
>> So the logic to throw the sendFailIfNoSpace is still dependent on
>> producer
>> flow control for memory usage by non persistent messages.
>> 
>> Also, in case you are still no getting a sync send, can you enable an
>> exception listener on your client connection?
>> 
>> 
> 
> 

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

Reply via email to