On Tue, May 11, 2010 at 1:06 PM, Bryan Moore <br...@bryanmoore.com> wrote: > I've encountered what seems to me to be a very strange behavior when using > discovery. > > Here is my original client connection setup... > "tcp://myserver:61616?jms.useAsyncSend=true" > > The writes to the queue occur very fast, approximately one per MS. > > INFO 2010-05-11 14:40:08,799 [Thread-5] com.dt.QueueLoader: Put file on > queue:1273603208799 > INFO 2010-05-11 14:40:08,800 [Thread-5] com.dt.QueueLoader: Put file on > queue:1273603208800 > INFO 2010-05-11 14:40:08,801 [Thread-5] com.dt.QueueLoader: Put file on > queue:1273603208801 > INFO 2010-05-11 14:40:08,802 [Thread-5] com.dt.QueueLoader: Put file on > queue:1273603208802 > INFO 2010-05-11 14:40:08,803 [Thread-5] com.dt.QueueLoader: Put file on > queue:1273603208803 > INFO 2010-05-11 14:40:08,803 [Thread-5] com.dt.QueueLoader: Put file on > queue:1273603208803 > INFO 2010-05-11 14:40:08,804 [Thread-5] com.dt.QueueLoader: Put file on > queue:1273603208804 > > > Now if I change the connection setup to this... > "discovery:multicast://default?jms.useAsyncSend=true" > > The writes slow down, one every 30-40 MS. > > INFO 2010-05-11 14:46:40,542 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600542 > INFO 2010-05-11 14:46:40,576 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600576 > INFO 2010-05-11 14:46:40,618 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600618 > INFO 2010-05-11 14:46:40,651 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600651 > INFO 2010-05-11 14:46:40,684 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600684 > INFO 2010-05-11 14:46:40,718 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600718 > INFO 2010-05-11 14:46:40,760 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600760 > INFO 2010-05-11 14:46:40,802 [Thread-6] com.dt.QueueLoader: Put file on > queue:1273603600802 > > > Any idea what the cause could be? Maybe I cannot pass useAsyncSend like I > am when using discovery?
I think the problem can be attributed to the difference between the nature of the synchronous vs. the asynchronous send operations. A synchronous send is going to block while it sends whereas the asychronous send will not block and instead the send will take place using a separate thread in the background and this can take some time. Bruce -- perl -e 'print unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' ActiveMQ in Action: http://bit.ly/2je6cQ Blog: http://bruceblog.org/ Twitter: http://twitter.com/brucesnyder