Yes, that does work, thanks. :) However, without alwaysSyncSend=true, commit() is not performed synchronous (or at least, the call to commit() is completed without errors), so this is still a strange transactional contract.
Setting alwaysSyncSend=true seems to have had a huge performance impact on the application, but I'll see if tuning the configuration can solve this. > No, use alwasySyncSend==true. > > Transactions are sent asynchronously as Tim mentioned, however the commit > is always synchronous. You can force all sends within the TX to by sync > with the above property. This would get you the sendFailIfNoSpace exception > on the same thread. > > > On Thu, Aug 29, 2013 at 5:50 AM, jvbrandis <[hidden email]> wrote: > > > >> > > >> What's happening is that inside a transaction the normal behavior is to > > >> send messages without waiting for a response from the broker (async) > > >> which is why the only way the exception gets noticed is by an exception > > >> listener. You can however configure this to work by using the option > > >> 'setUseAsyncSend' on the ActiveMQConnectionFactory to force all send to > > >> wait for a response which will then cause the exception to be thrown > > >> from the producer send. > > >> > > >> You can set this on the connection URI via: > > "tcp:xxx:x?useAsyncSend=false" > > > > > > Thanks! > > > > > > I still think that it is bad form that commit() is completed without > > error when any (or all!) my messages are discarded. > > > Even if the message send()-operation is async, the commit() should be > > sync…. > > > > > > Anyway, thank you for the configuration tip! > > > > A little update, setting jms.useAsyncSend=false did not help. > > According to documentation, jms.useAsyncSend=false is the default. > > Also, when not using sendFailIfNoSpace(AfterTimeout), the client is > > blocked until space is available (as expected). > > So this is a feature/bug only appearing when using sendFail… > > > > > > > > > > > > > > -- > > View this message in context: > > http://activemq.2283324.n4.nabble.com/Clients-not-receiving-ResourceAllocationException-in-transacted-sessions-tp4670862p4670905.html > > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > > > > > -- > *Christian Posta* > http://www.christianposta.com/blog > twitter: @christianposta > http://www.christianposta.com/blog > > > If you reply to this email, your message will be added to the discussion > below: > http://activemq.2283324.n4.nabble.com/Clients-not-receiving-ResourceAllocationException-in-transacted-sessions-tp4670862p4670907.html > To unsubscribe from Clients not receiving ResourceAllocationException in > transacted sessions, click here. > NAML -- View this message in context: http://activemq.2283324.n4.nabble.com/Clients-not-receiving-ResourceAllocationException-in-transacted-sessions-tp4670862p4670913.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.