activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: Clients not receiving ResourceAllocationException in transacted sessions
Date Thu, 29 Aug 2013 13:24:26 GMT
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 <joakim@mnemonic.no> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message