activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: risks associated with useAsyncSend=true and tcp transport / persistence
Date Fri, 17 Nov 2006 00:07:35 GMT
On 11/16/06, Philip Fisher-Ogden <pfishero@gmail.com> wrote:
>
> What are the risks associated with setting useAsyncSend=true on a tcp
> transport while also using persistent messages and no transactions?
>
> The documentation at http://incubator.apache.org/activemq/async-sends.html
> indicates:
> "Many high performance applications are designed to be tolerate a small
> amount of message loss in failure scenarios. If your application has been
> designed in this fashion, you can enable the use of async sends to increase
> throughput even when using persistent messages."
>
> My application does not have any code specific to recovering from message
> loss.  Am I at risk for losing messages if I use the combination of tcp
> transport, useAsyncSend=true, persistent messages, and no transactions?
>

yes.. the very last couple of messages sent could be lost.  This is
why we don't enable useAsyncSend by default.  To increase throughput
of persistent message sending and guarantee that you will not loose
any messages, you should send batches of messages within a jms
transaction.

> For reference, here is a snippet from my activemq.xml broker config:
> --
>   <persistenceAdapter>
>       <journaledJDBC journalLogFiles="16" dataDirectory="journal-vm"
> dataSource="#derby-ds"/>
>     </persistenceAdapter>
>     <transportConnectors>
>       <transportConnector
> uri="tcp://localhost:61636?jms.useAsyncSend=true"/>
>     </transportConnectors>
>   </broker>
> --
>
> Thanks,
> -Philip Fisher-Ogden
> --
> View this message in context: http://www.nabble.com/risks-associated-with-useAsyncSend%3Dtrue-and-tcp-transport---persistence-tf2648502.html#a7390925
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Mime
View raw message