You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Philip Fisher-Ogden <pf...@gmail.com> on 2006/11/17 00:33:42 UTC

risks associated with useAsyncSend=true and tcp transport / persistence

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?

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.


Re: risks associated with useAsyncSend=true and tcp transport / persistence

Posted by Hiram Chirino <hi...@hiramchirino.com>.
On 11/16/06, Philip Fisher-Ogden <pf...@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